Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SoftPWM MotorSMLAP
Fork of CANnucleo_Hello by
Diff: main.cpp
- Revision:
- 26:f71400b1fa56
- Parent:
- 25:1d0488a03905
- Child:
- 27:50dcf8aea3ee
--- a/main.cpp Wed Mar 08 19:19:22 2017 +0000
+++ b/main.cpp Wed Mar 08 19:26:27 2017 +0000
@@ -119,7 +119,7 @@
counter++; // increment counter
txMsg.clear(); // clear Tx message storage
txMsg.id = TX_ID; // set ID
- voltage = (analogIn * 5)/4096.0f; // small floating voltage at analog input
+ voltage = (analogIn * 3.3f)/4096.0f;// small floating voltage at analog input
txMsg << counter << voltage; // append data (total data length must be <= 8 bytes!)
led = OFF; // turn LED off
if(can->write(txMsg)) { // transmit message
