Unicode output from an Arduino.

I have been working hard on a second edition for my book called "Practical Arduino C". The new edition has an extra chapter focusing on adding an Internet capability to Arduino boards plus some additional data structures. Overall, the text has been polished and the index extended and tidied. I have also changed the way the book is being published and sold. This has halved the retail price while still ensuring fast delivery when ordered from Amazon (link coming shortly).

One item that featured in the first edition has been dropped as with hindsight it became clear that it did not add to the reader's learning experience. It made sense therefore to move the section on Unicode output over the Arduino serial interface to a blog post here.

Unicode Characters

The Arduino C is a great tool for manipulating, displaying and communicating ASCII encoded characters, which is perfect if the language you want to use is based upon the Latin character set. Most recent programming languag…

Arduino Confusion Continues

I am an Arduino fan. I love programming in C and the Arduino platform lets me run my programs “on the metal” as they say. No whinging and whining from an operating system just me and my code.
After a few months without a C “fix”, I recently revisited the Arduino world by buying one of the new MKR boards. I plumped for the MKR WiFi 1010 as that looked to be the one most likely to become the “Uno” of this new generation of devices. I also wanted to see how the Internet browser based development environment was coming along and then there was talk in odd places about some new thing called the “IOT Cloud”. Having had a good look around, I am more than a little confused.
First thing I tried was the Arduino Web Editor. I had an elderly 11” Chromebook that is nice and light and I thought that might be a great device for Arduino web based programming as, after all, it is really just a (small Linux) container for the Chrome Browser. It was an interesting first choice. When I signed into the W…

Mini Lidar for £11

Well to be honest, a VL53L0X time of flight chip mounted on a small circuit board and then attached to a pan and tilt set-up positioned by 9g servos.

The data sheet for the VL53L0X chip is here.
Adafruit do a very nice little VL53L0Xboard although they can also be easily sourced from a number of suppliers. I downloaded the AdaFruit Arduino wrapper for the device library to get me started. Communication is over an I2C serial interface which keeps things straightforward. 
Connections from an Arduino are just to SDA and SCL as well as 5v and ground.
The tiny VL53L0X chip includes a 940nm VCSEL laser (Vertical Cavity Surface-Emitting Laser) fitted with infra-red filters giving reasonable immunity to ambient light interference. The laser is safe and will not damage eyesight. The device sends out a short laser pulse and measures the time taken for the light to be reflected back. The measurement range is up to 2 metres although the device is normally operated in one of 4 modes. There is a …

Sonar Scanner Part 2

The second iteration of the sonar scanner (part 1 is here) has seen a switch to an Arduino Nano as the target board. This required soldering some pins to a piece of strip-board to allow multiple devices to take power from the limited 5v output available on the Nano. This allowed some simplification to the “rats nest” and the set-up as a “chip on the old block” as a precursor to any installation. The current layout made testing the revised software somewhat easier.

Here is a rather thrown together diagram of the connections. Not up to publication standards but hopefully clear enough for anyone interested.
The Arduino sonar scanner support software is now transformed into a state machine where each “task” set by a controlling processor over an I2C serial connection switches between states. The controlling (master) board can also request data from the Nano with the data returned being dependent upon the current state.
The idea is that it should be straightforward to introduce new option…

Sonar Scanner

As part of an ongoing project I sourced a mounting bracket for an HC-SR04 ultrasonic sensor sitting on top of a 9g servo motor that can be used to rotate the sensor through a 180 degree arc. I also wanted to include a DHT11 temperature sensor to help determine a more accurate speed of sound.

The final setup will probably be run from an Arduino Nano but before planning that I wanted to run some tests on a handy Uno as that has more power supply pins immediately available. The actual rats nest is shown.

Here are how the components are wired up to the Arduino.

The DHT11 I have is mounted on a little board that includes a pull-up resister between Vcc and the data pin and in fact only exposes Vcc, Ground and data out pins. This is the most common format around as far as I can see and adds up to a nice package that has reasonable accuracy (within 2C in the range 0C to 50C). I downloaded and installed the DHT library from Adafruit to read the sensor although there are others around.

The tes…