Eight maids a milking

Connect your micro:bit and thus fridge to the internet!

Track your milk levels

Tweet a milkmaid to get more milk when you're out of milk

Pray the milkmaid actually gets more milk.


You'll need

  • 1 x micro:bit
  • 1 x IoT:bit
  • 1 x IR Line Following Sensor
  • 1 x OLED Screen
  • 1 x Battery Pack
  • 1 x Milk Bottle

Step 1

Instructions

Connect all your hardware.

In this tutorial we've connected the IR Line Following Sensor to Pin1, although you can choose other pins.

Plug the OLED screen into the appropriate GND/VCC/19/20 lines as shown.
Very very strictly, the OLED screen is not necessary for the purposes of this project. But if you want to keep your sanity while debugging then I would suggest using an OLED for error and confirmation messages.




Materials

  • 1 x micro:bit
  • 1 x IoT:bit
  • 1 x IR Line Following Sensor
  • 1 x OLED Screen
  • 1 x Battery Pack

Step 2

Instructions

(a) Log into Thingspeak and set up an account.
(b) Create a new channel once your account is up and running.


Step 3

Instructions

Let's start coding! To setup your IoT:bit,

(a) Key in the WiFi SSID (that's the name of the network that you connect to (b)Key in the password (you should have the password of the network you're connecting to, otherwise maybe you're not supposed to use this network?)
(c)Set up a small test to make sure you're on the network, and keep trying to connect until you do get onto the network.


Step 4

Instructions

Code your micro:bit to send data to ThingSpeak:
(a) Connect to ThingSpeak
(b) Set the data that you will be sending to ThingSpeak, You can see here that there are up to 8 fields you can use. But don't worry, you don't have to fill them all up. We only have one sensor (the IR line following sensor) that is on Pin1.
(c) Send the data to ThingSpeak.
(d) Code some checks to make sure that the data is actually sent.


Step 5

Instructions

Trigger a Tweet whenever your milk goes low.

Set up a Twitter account.

If you already have one, connect it to the ThingTweet app, then use the React App in ThingSpeak to start sending a tweet with your connected twitter account every time the milk bottle has been empty for too long.


Step 6

Instructions

Power up your IoT:bit with a battery pack and secure it where you can see it in the fridge. Place your milk bottle in and start tracking! (Or tweeting at milkmaids)


Code and References

Completed this tutorial?

Spread the word! Let's get this trending on social media with #letsgethacking #Eightmaidsamilking