- Use microbits for data gathering (well-known and easy) and ESP8266 for wifi to hub
- microbit<->ESP8266 via serial port(s)
- This is relatively simple
- microbit<->ESP8266 via I2C!! An interesting idea
- Uses Wire() library on ESP, I2C on microbit
- Experimenting with ESP32 microPython Bluetooth
- Using ChatGPT (!) generated code - it refers to ble_advertising module
- Didn't get that to work yet, in fact it gave wrong answers for the ESP32 code and the microbit code just wouldn't run
Code Club
Wednesday, 24 July 2024
Code Club Showcase Ideas
Saturday, 4 May 2024
Minecraft and ??
The Code Club is looking for some engaging project material, so we're going to start collecting environmental data (microbits, esp8266, DS18B20, SHT3X, CO2 sensors), behaviour survey data (Google Forms, Sheets) and other data (Openweather.org, the RPi weather project when it works), and hopefully collating it all in an internal web site.
Part of this will be about the school's environment, in-room data being collected and hopefully displayed and analysed. Maybe we can do something about the litter problem too!
Some of the CC members are keen Minecraft players, and I wondered if it would be possible to get Minecraft involved in displaying data. It turns out that Minecraft is a Minefield, with two different game implementations (Java - Windows/OSX/Linux; Bedrock - Windows/XBox/PSx/iOS), and loads of concepts to get one's head around. Of course, MC is a client/server architecture multiplayer game, so maybe the client isn't important, only the server, which we can get copies of. However, note that the server provided at that link is only compatible with Java Edition.
The Fandom Minecraft wiki has lots of useful analysis of the MC architecture and so on. It turns out that the desktop/tablet/console "client" actually has both client and server components:
- Client component handles movement, display etc., as you'd expect, as well as various server functions that operate locally to reduce the required network bandwidth, and which sync with the server when they can
- A server instance, hosted on the local device, which provides the local worlds, and which behaves like the actual server
- Remote server for multiplayer interaction, which is hosted on another computer
To be continued...
Sunday, 11 February 2024
Microbits and external temperature/humidity sensors
Microbits come with a built-in temperature sensor, but sadly it's
- built into the chip, so gets affected by the chip heat
- built into the board, so hard to measure stuff other than by dropping your microbit into the water you're trying to measure the temperature of (for example!)
- DS18B20 - the model in a can, so relatively waterproof and on a 1m lead
- SHT30 - this is a T/RH measuring chip, which I have on a Wemos-style PCB, convenient for normal people to use
DS18B20
SHT30
- I didn't look hard enough
- The use of separate modules in Mu/Mbit MicroPython wasn't obvious
- main.py, which imports SHT30.py as a module (it's a class)
- SHT30.py
Sunday, 16 April 2023
Home Automation?
Lots of ideas in the home automation field:
- Temp sensor + fan to cool, or notional "heating"
- Light sensor + lights turning on
- Burglar alarm using contacts, accelerometer
- ??
Monday, 24 October 2022
QR Codes
QR codes can be used to encode lots of different kinds of data viz.
- URLs
- Free text
- Contact
- App
- Phone
- SMS
Monday, 17 October 2022
Tuesday, 11 October 2022
Micro:bit musical instrument?
Science Oxford Code Club is doing musical instruments on 22 October, but the current thinking is all about hitting, because that's quite easy with servos. How about a wind instrument?
- Source of wind - either operator or some sort of fan/funnel/concentrator/tube
- Win instruments have
- a buzzer thing, like a reed instrument
- a whistle, like a recorder
- a flute-like transverse blowing arrangement
- Needs variable pitch preferably
- Change pipe length - slider like a trombone?
- Change pipe length - stop off holes, like most instruments
- Change pipe - like an organ, pan pipes etc.


