FTDI working - with added micro:bit

micro:bit showing Bar Chart of varying voltage as I turn the pot
I've been fiddling around with Martin Wooley's BittyDataLogger app and a micro:bit, connected using Bluetooth LE. The m:b is supposed to send all its sensor data and the voltages on pins 0-2 to the app, which then saves the values and graphs them. The sensor data works but the pin voltages don't seem to. Anyway... I wrote a tiny m:b programme to read the voltage on a 50k pot on Pin0, and display the value using the builtin magic LED display and "bar graph <value>" call. Here's the code on the m:b online editor:



Then I saw that the m:b blocks now allow the serial RX/TX to be redirected to various output pins!! Hey hey...

First, got the serial working with the m:b Serial-USB connection, as read by the Arduino Serial Monitor... No probs. Then redirected to pins I strapped into the FTDI chip on the breadboard, which has its own USB connection of course. And voila!! Serial-USB through the FTDI. Job's a good 'un.

At least, once you've realised that the Tx/Rx need to be connected to the Rx/Tx - that was my first error, connecting Tx/Rx to Tx/Rx i.e. one should connect one device's input to the other's output and v.v.


Comments

Popular posts from this blog

Replacing Coffee Machine Pump (Dualit Espressivo)

Multiple SHT30 sensors on a single I2C bus with Sonoff-Tasmota

NodeMCU + Tasmota code + SHT30