LEDComm
1.0
|
LEDComm is a library that allows you to use a single LED for slow (around 30 baud), very short range wireless (less than an inch), bidirectional asynchronous serial communications. The signalling allows for half-duplex operation, 7- or 8-bits per character (transferred in MSB first/big-endian order) and optional odd, even, mark or space parity. A description of its operation is provided at http://mecrisp.sourceforge.net/ledcomm.htm (kudos to the author of the page, Matthias Koch, for the inspiration!).
This code has only been tested with ChibiOS/RT V2.6.x (stable) on ST_NUCLEO_L152RE
and ST_NUCLEO_F401RE
boards but should work on any STM32 board without modification (using ChibiOS, of course). With the appropriate setting of an EXT configuration, it should work on any platform supported by ChibiOS.
LEDComm was developed as part of a project to collect data from honey bee hives. I wanted an effective (and cheap) way to exchange data between the hive boxes that didn't involve wires. Just as Giovanni Di Sirio has shared ChibiOS with the community, I offer this small contribution in return.
The LEDComm
library depends on a few HAL modules so the following manifest constants in halconf.h
must be set to TRUE:
Additionally, the LEDComm
library depends on a few ChibiOS modules so the following manifest constants in chconf.h
must be set to TRUE:
In order to use the LEDComm driver the source code must be extracted in the $(CHIBIOS)/ext
directory. Your project Makefile
must be modified by adding $(CHIBIOS)/ext/ledcomm-X.Y.Z/ledcomm.c
to the CSRC
variable and
to the $
(CHIBIOS)/ext/ledcomm-X.Y.ZINCDIR
variable.
You must then copy the $(CHIBIOS)/ext/ledcomm-X.Y.Z/templates/ledcommconf.h
configuration header to your project directory and modify the hardware configuration as desired.
Some example applications are provided in the $(CHIBIOS)/ext/ledcomm-X.Y.Z/examples/
directory.