By connecting to the "ACM" port exposed on the USB of the STM32 (used as a service and connected to a PC) it is possible to send alphanumeric command (eg with "minicom") in order to perform: -Digital Output. -Switched pulse. -Digittal Input. -Analogic Input. -Request of a brief (returned by the serial line): 'H' or '?'. Note that all the commands can be given on a single string and it will be executed readily just at the instant each one is completely received.
Diff: src/main.cpp
- Revision:
- 3:a425b8b0a4c2
- Parent:
- 1:cae05f3e5d56
diff -r 59f9abdd702e -r a425b8b0a4c2 src/main.cpp --- a/src/main.cpp Sun Dec 31 15:17:58 2017 +0000 +++ b/src/main.cpp Wed Jan 17 07:35:05 2018 +0000 @@ -23,9 +23,9 @@ * By connecting to the "ACM" port exposed on the USB of the STM32 (used as a service and connected to a PC) it is possible to send the * following commands in text format (eg. with "minicom"). * -Digital Output: command 'DO P<portName [B-G]> *<pinNumber [0-15]> <value [01]>;'. - * -Switch Pulse: combo 'DP P<portName> *<pinNumber [0-15]> <time>;'. + * -Digital Pulse: command 'DP P<portName> *<pinNumber [0-15]> <time>;'. * Where <time> is a float value with a maximum accuracy of 10 ^ -3 Sec (eg: 0.00x is valildo, 0.000x is not valid). * - * From the moment the specified output is called, it is denied until the specified time expires. + * From the moment the specified comand is given, the corresponding digital output is swhitched until the specified time expires. * Note that it can be called reentrant and burst: the effect is exactly the one programmed: many "Timeouts" are instantiated every request and disallowed * after the expiration of its time. * -Digital Input: command 'DI P<portName> *<pinNumber [0-15]>;'. Return '[01];' according to the voltage level present on the specified pin (0 or 1).