Reads analog A0 AND A2 and transmit them thorugh lora (no encryption)

Dependencies:   BufferedSerial SX1276GenericLib mbed

Files at this revision

API Documentation at this revision

Comitter:
gabrio
Date:
Thu May 31 13:13:41 2018 +0000
Parent:
4:182eacdfbf7d
Commit message:

Changed in this revision

Transmitter/Transmitter.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 182eacdfbf7d -r 2ac61718bfd8 Transmitter/Transmitter.cpp
--- a/Transmitter/Transmitter.cpp	Wed May 30 14:30:17 2018 +0000
+++ b/Transmitter/Transmitter.cpp	Thu May 31 13:13:41 2018 +0000
@@ -211,8 +211,7 @@
     while(1){
     	
     	//ANALOG0 READ AND SEND
-    	readed = analog0.read();
-    	int t = snprintf(readed_tostr,sizeof(readed_tostr),"ALGG A0:%f A2:%f",analog0.read(),analog2.read());
+    	int t = snprintf(readed_tostr,sizeof(readed_tostr),"ALGG A0:%f A2:%f",10-analog0.read()*10, (analog2.read()*14.5)-1 );
     	
     	dprintf("sending:%s",readed_tostr);