MaxSonar Ultrasonic Distance Sensor MB1242 Example on mbed OS with Sync and Async I2C API
git pull
yt update
yt clean
yt target st-nucleo-f401re-gcc
yt install
yt build
Copy build/st-nucleo-f401re-gcc/source/maxsonar-example.bin
to the mbed folder or use st-flash as shown below.
st-flash write build/st-nucleo-f401re-gcc/source/maxsonar-example.bin 0x8000000
Edit ASYNC
definition in app.cpp.
#define ASYNC 1
The value 1
for enabling asynchronous API and 0
for enabling synchronous API.
ASYNC
is 1
by default.
Set 115200 bps in order to connect to the USB serial port. The baud rate is set in config.json file.
-
1.1.0
- I2C Asynchronous API support
- NOTICE) The mbed OS I2C Asynchronous API is still unstable, the project MAY not work on mbed OS in the future
-
1.0.0
- Initial Release