[Home]Newer Microcontrollers

HomePage | RecentChanges | Preferences | My Website home page

Newer Microcontrollers

There are many boards available now.

https://wokwi.com/ looks interesting.

Micro Python can be used

Thonny and Micro Python, and also CircuitPython?

Arduino IDE supports many Boards

Arduino projects

Arduino Colordunio And SVG Projects

Arduino based logger and SVG Graph

https://www.sites.google.com/site/unoardusim/services - Prof Simmons has a really good simulator . He recently retired from the Department of Electrical and Computer Engineering at Queen's University, Kingston, Ontario, Canada.

new links:-

https://circuitdigest.com/tutorial/unoardusim-a-simulator-to-learn-arduino-programming-and-debugging-without-arduino-board

https://sites.google.com/site/unoardusim/home

Bellcode Repeater - Arduino based Railway Signal box Bell code repeated

http://arduinolearning.com/code/program-attiny2313-arduino.php instructions for Tiny2313 chip.

DigiSparks

Once again eBay suggested I buy some DigiSparks. At the price suggested, it was worth a go. They are super for HID keyboard automation. I have needed to reflash the bootloader once or twice.

Adding DigiSparks to Arduino IDE. See:- DigiSparks.

https://www.instructables.com/Digispark-DIY-The-smallest-USB-Arduino/

This is very helpful: http://digistump.com/wiki/digispark/tutorials/connecting

Drivers and firmware: https://github.com/micronucleus/micronucleus v2.04

I got this when using the board manager and Win10: "CRC error, file corrupted. Try to repeat later"

This helped. https://github.com/arduino/Arduino/issues/9719

I deleted C:\Users\doug\AppData?\Local\Arduino15\library_index.json

When I next opened the IDE it seemed to have installed the new boards.

	C:\Users\doug\AppData?\Local\Arduino15\library_index.json
	~/.arduino15/library_index.json

https://github.com/arduino/Arduino/issues/9719 - Win10 reports CRC error

I have updated my old ADSL2 hub as it was corrupting iPhone updated and the new hub seems to work.

ESP01 and IOT

ebay suggested the ESP01 and support to reprogram these has been added to the Arduino.

Another way to upload code onto them is to use MicroPython? and the Thonny Python IDE shipped with the Raspberry Pi.

https://micropython.org/download/esp8266/ - there are plenty of examples which can be uploaded using Thonny at the touch of the GO button.

Similar information is posted on:

I brought some little boards with the DS18B20 chips to measure temperature. They came with ESP01S

The DS18B20 is connected to IO 2

I can power the blue board with a USB cable plugged into a mains adaptor with a 5V USB-A socket.

I used an IR Infrared Thermometer to measure the temperature of the ESP01 and the board.

The ESP01S gets quite warm at about 30 degree C

If you leave the ESP01 unplugged, and power up the blue board, it seems to be a 1 degree hotter than the red card.

I brought some waterproof DS18B20 with 1m of cable, which could be soldered onto the back of the blue board. This seems to be reading a realistic temperature.

They are reading about 8 to 10 degrees less.

This Thonny sketch allows me to poll the temperature using a web server.

http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py

http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py - a later version.

I can poll this with a cron job and use curl and grep out what I want. The time stamp comes from the Raspberry Pi Zero.

 ===
 2026-02-13 21:30
    <h2> 2 , DS18B20 , 5.0 , 15.125 ,  [, 0x28,0xe8,0x42,0xc0,0x0,0x0,0x0,0xc5, ] ,  [,  0x28,0x20,0x4d,0xbc,0x0,0x0,0x0,0x2e, ] ,  </h2>

It might be better to use a client that deep sleeps the ESP01, wakes up takes the measurement, sends it to a server and deep sleeps.

http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20_2.py is a mash up from the links below.

https://docs.micropython.org/en/latest/esp8266/tutorial/onewire.html has an example.

Open Thonny and type help() and it has example code for connecting the ESP01 to the WiFi?.

https://docs.micropython.org/en/latest/esp8266/tutorial/network_tcp.html has some code for a web server.

Thonny would not let me save main.py to the ESP-01S until I flashed it with the 1MB vesion.

I needed to use the 1MB bin so I could save main.py

ESP8266_GENERIC-FLASH_1M-20251209-v1.27.0.bin found on https://micropython.org/download/ESP8266_GENERIC/

I soldered two more DS18B20 to the back of the board.

I used a waterproof DS18B20 with 1m wire and the other one has a 3m lead.

I soldered a modified USB lead onto the board so it can be plugged into a 5V USB power supply.

 [ 5v PSU ]---usb lead ---[ blueBoard with DS18B20 & ESP-01 ]---1m DS18B20 & 3m DS18B20 sensors

The blue LED light up the room!

http://www.dougrice.plus.com/dev/tcpip/IOT/mainDS18B20used.py is a later version, saved as main.py on the ESP01.

I copied it from main.py saved on the ESP01. The WiFi? SSID and KEY have been edited.

Typical ouput when you open the webpage http://192.168.1.87/ on the ESP-01

 ESP8266 DS18B20
 3 , , DS18B20 t= ,15.5,15.5,25.5,
 roms: [, 0x28,0x1a,0xd2,0x34,0x0,0x0,0x0,0x11, ] , [, 0x28,0xe8,0x42,0xc0,0x0,0x0,0x0,0xc5, ] , [, 0x28,0x20,0x4d,0xbc,0x0,0x0,0x0,0x2e, ] ,

View Source shows:-

 <!DOCTYPE html>
 <html>
    <head> <title>ESP8266 DS18B20 </title> </head>
    <body> <h1>ESP8266 DS18B20 </h1>
    <h2>  3 , , DS18B20 t= ,15.5,15.5,25.5, </h2>
    <P>roms:  [, 0x28,0x1a,0xd2,0x34,0x0,0x0,0x0,0x11, ] ,  [,   0x28,0xe8,0x42,0xc0,0x0,0x0,0x0,0xc5, ] ,  [, 0x28,0x20,0x4d,0xbc,0x0,0x0,0x0,0x2e, ] ,  </P>

    </body>
 </html>

On a Raspberry Pi Zerro W, I set up a cron job using "crontab -e" to run a shell script every 15 minutes.

It uses curl to fetch the web page and grep out the temperatures.

 # Poll ESP01  DS18B20 Webserver in loft
 echo "==="                      > /home/pi/log18B20lastCurl.txt
 date  -u +'%Y-%m-%d %H:%M'      >> /home/pi/log18B20lastCurl.txt
 curl --http1.0 192.168.1.87 | grep "h2"         >> /home/pi/log18B20lastCurl.txt
 #cat /home/pi/log18B20lastCurl.txt   >> ~/www/curl.txt
 awk -f /home/pi/t3.awk  /home/pi/log18B20lastCurl.txt >> ~/www/curl.txt

which typicallly logs:-

 2026-03-16 07:00 ,  DS18B20 t=  , 13.875 , 14.8125 , 24.75 ,  </h2>
 2026-03-16 07:15 ,  DS18B20 t=  , 14.4375 , 15.0625 , 25.0625 ,  </h2>
 2026-03-16 07:30 ,  DS18B20 t=  , 14.9375 , 15.3125 , 25.25 ,  </h2>
 2026-03-16 07:45 ,  DS18B20 t=  , 15.4375 , 15.5625 , 25.4375 ,  </h2>

The graph below shows that the DS18B20 on the blue board is affected by the ESP-01.

The blue line is a DS18B20 next to a window and the red line is the other one in the shade.

ESP01 , ESP8226 and IOT

ebay suggested the ESP01 and support to reprogram these has been added to the Arduino.

ebay also suggested esp8226 modules in the nodemcu , Witty and ESP8266-Development-Board-WeMos?-D1-R1

The Raspberry Pi foundation helped me use a web page to drive an ESP01 over a serial lead

This code is based on code found in HACKSPACE #44 p98,p100

https://hackspace.raspberrypi.com/issues/44 has two articals about using a Web browser to drive a serial port.

http://hsmag.cc/Simpleterm

https://www.connectedlittleboxes.com/simpleterm.html

http://hsmag.cc/CLBproject

http://www.dougrice.plus.com/dev/DigiSpark/simpleterm/simpleterm.html - needed

http://www.dougrice.plus.com/dev/DigiSpark/simpleterm/simpletermESP01.html - needed CRLF fix, but I have a button box to send commands to the ESP01 and ESP8266 boards.

And controlling a modem using Serial Lead and modem that supports AT+MS=V21. Some modems only support AT+MS=0 and they do not work. Some USB modems are not listed by CONNECT button, but can be used using Putty. It seems that using device manager on windows helps make them visble.

You cannot use http: as this could be attacked using "man in the middle" attacks.

http://www.dougrice.plus.com/dev/DigiSpark/simpleterm/simpletermModem.html

The web page must be local or https:

https://homepages.plus.net/dougrice./dev/DigiSpark/simpleterm/simpletermModem.html - simple dial up modem Webpage.

Raspberry PICO

The PIO state machine looked interesting.

The documentation looks good and easy to follow.

PICO Initial impression.

Loading the MicroPython? .uf2 seemed simple once downloaded.

I could get Putty to show the REPL >>>>.

I did a select all and tried to paste into the Putty session, but the line endings were not correct.

Some examples had "LED" which needs changing to 25

Using Notepad++ use Edit-EOL to change exampled to have Windows CR LF.

Do a Cntr-A to select ALL and copy

Then paste into Putty and they seem to up load.

The Blink examples make the onboard LED flash on and off.

Getting the C examples needed you to follow the instructions and download a lot of code.

The Raspberry Pi PICO RP2

These can also use MicroPython? and the Thonny Python IDE shipped with the Raspberry Pi.

https://micropython.org/download/rp2-pico/

I brought a magazine and the artical about the PIO was interesting.

The Python examples are excellent, and you can add comments.

Raspberry Pi PICO , MicroPython? and Thonny IDE

The Raspberry Pi ships with Thonny IDE for Python.

It has a feature to allow it to point to other REPL.

You can connect it to the RP2 and ESP01, ESP8226 and ESP30

https://docs.micropython.org/en/latest/rp2/quickref.html

https://micropython.org/download/rp2-pico/

For tinkering and dabbling and learning, this is excellent.

Raspberry Pi PICO PIO

Looks an interesting challenge and the Python examples seemed to be a good way to learn.

Raspberry Pi PICO using Arduino IDE

With "Arduino MBED OS RP2040 Boards 3.3.0" installed you can generate .uf2 files for upload.

https://github.com/arduino/ArduinoCore-mbed

https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/USBHID/examples

There is a USBHID keyboard example.

 #include "PluggableUSBHID?.h"
 #include "USBKeyboard.h"

 USBKeyboard Keyboard;

 void setup() {
  // put your setup code here, to run once:
 }

 void loop() {
  // put your main code here, to run repeatedly:
  delay(1000);
  Keyboard.printf("Hello world\n\r");
 }

STM BluePill? Stm32f103c8t6

Stm32f103c8t6

Some links about using them with ArduinoIDE?

https://www.electroniclinic.com/stm32-blue-pill-arduino-ide-getting-started-tutorial-stm32-boards/

I upload with the STlink and use serial1 instead of serial.

 /*
 * BluePill? - USB Serial lead
 * A9  TX - white
 * A10 RX - green
 * 
 * use serial1

  // initialize serial communication at 9600 bits per second:
  Serial1.begin(9600);  //TX1: A9 
  Serial2.begin(9600);  //TX2: A2
  Serial3.begin(9600);  //TX3: PB10
 */

Raspberry Pi projects

pi config - notes on setting up my pi

plotting DS18S20 temperature readings using SVG

snake game The Raspberry Pi has a snake game on the AstroPi?. It shows how to poll the joystick. http://www.dougrice.plus.com/dev/PiStuff/snake/ has reworks to read usb games controller.


HomePage | RecentChanges | Preferences | My Website home page
This page is read-only | View other revisions
Last edited March 30, 2026 2:49 pm by dougrice.plus.com (diff)
Search: