2019-03-19 08:52:48 +01:00
|
|
|
stm32f4disc-demo
|
|
|
|
================
|
|
|
|
|
2019-04-02 15:47:57 +02:00
|
|
|
This is just some STM32F4DISCOVERY demo application using Rust.
|
2019-04-11 20:21:41 +02:00
|
|
|
It has a simple serial command-interface for controlling (via GPIO) what the
|
|
|
|
LED ring does: cycle clock-wise, counter clock-wise, or follow the
|
|
|
|
accelerometer. The accelerometer is accessed via SPI.
|
|
|
|
|
|
|
|
The project also shows how to do unit testing and how to use GitLab CI.
|
2019-03-19 08:52:48 +01:00
|
|
|
|
|
|
|
Serial interface
|
|
|
|
----------------
|
|
|
|
|
2019-04-02 15:47:57 +02:00
|
|
|
The serial interface is configured on USART 2 and can be accessed using, for
|
|
|
|
example, an USB-to-serial cable connected to a ground pin, and RX to PA2 and TX
|
|
|
|
to PA3.
|
2019-03-19 08:52:48 +01:00
|
|
|
|
|
|
|
The interface will output the following lines:
|
|
|
|
|
|
|
|
* `init` after initialization has finished
|
|
|
|
* `button` when the user button has been pressed
|
|
|
|
* `level` when the board is being held in a perfect level position (when in
|
|
|
|
acceleration mode)
|
2019-06-24 22:32:19 +02:00
|
|
|
|
2019-03-19 08:52:48 +01:00
|
|
|
The following lines can be given as commands:
|
|
|
|
|
|
|
|
* `on` to turn all the leds on (and disable accelerometer/cycle mode)
|
|
|
|
* `off` to turn all the leds off (and disable accelerometer/cycle mode)
|
|
|
|
* `accel` to switch to accelerometer mode
|
|
|
|
* `cycle` to switch to cycle mode
|
|
|
|
* `stop` to freeze the LEDs in the current position
|
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
[0-clause BSD license](LICENSE.md).
|