Fun with Coding and Electronics

Short link to this page: bit.ly/dbshs-0

Classroom and Self-Directed Learning Resources

2024-09-18

First day, great fun, tutorials for MakeCode for micro:bit, then getting car going. Some made a fighting arena with big wooden blocks. Others started to make their own line-following track.

2024-09-25

CuteBot Cars

Some kids assembled the CuteBot grabbers and got them working. Some made attempts at line following.

MakeCode Arcade

Toward the end we tried MakeCode Arcade.

2024-10-02

micro:bit Radio Feature

Lots of fun with the radio feature, first sending messages, and then remote control driving cars.

2024-10-09

Tinkercad Circuits

  • Battery and LEDs
  • Arduino blinking a light

Snap!

  • Moving one sprite and having a second sprite glide away on contact

2024-10-16

micro:bit Sensors

Let’s try out some of the sensors on the micro:bit.

Accelerometer

We made a program to react to the micro:bit being tilted, and one to show the tilt on the LED display.

Programming with JavaScript and p5.js

We made a program to draw using a rectangle and the mouse.

function setup() {
  createCanvas(400, 400);
  background('cyan');
}

function draw() {
  noStroke()
  fill('red')
  rect(mouseX, mouseY, 30, 10)
}

Car

Remote

Self-Directed Learning

See Resources at the top of this page.

2024-10-23

Tinkercad Circuits

  • Battery and LEDs

Button Battery and LEDs (Not Simulated)

Servo Motors

p5.js

function setup() {
  createCanvas(400, 400);
  background('black');
}

function draw() {
  stroke('red')
  line(0, 0, mouseX, mouseY)
  stroke('blue')
  line(width, 0, mouseX, mouseY)
  stroke('green')
  line(0, height, mouseX, mouseY)
  stroke('white')
  line(width, height, mouseX, mouseY)
}

Self-Directed Learning

See Resources at the top of this page.

2024-10-30

p5.js

3D Shapes

3D shapes

Pumpkin Code
function setup() {
  createCanvas(400, 400, WEBGL);
}

function draw() {
  background(220);
  fill('orange')
  stroke('gray')
  rotateX(-0.5)
  ellipsoid(30, 20)
  translate(0, -25, 0)
  fill('brown')
  cylinder(4, 10)
}

Self-Directed Learning

See Resources at the top of this page.

TinkerCad Circuits

Burglar Alarm

Burglar alarm

Self-Directed Learning

See Resources at the top of this page.

2024-11-06

Mr. B’s First Lego Spike Prime Robot

Video

Quick p5.js Review

Rotating “Mars”

function setup() {
  createCanvas(400, 400, WEBGL);
}

function draw() {
  background('black');
  stroke('lightgray')
  fill(205, 102, 52)
  rotateY(frameCount / 100)
  sphere(150)
}

Makecode for micro:bit Tutorials

Let’s pick some tutorials to do.

Self-Directed Learning

See Resources at the top of this page.

2024-11-13

Mr. B. Works on a Foursquare line fault detector

More with the micro:bit radio

Our code

Self-Directed Learning

Google’s Teachable Machine

Dave’s Model

Self-Directed Learning

2024-11-20

micro:bit CreateAI

Remember Google’s Teachable Machine? Now we can do something similar with the micro:bit.

Dave’s Demo

Self-Directed Learning

MakeCode Arcade

MakeCode Arcade