The Combine Forum - View Single Post - AgOpenGPS
Thread: AgOpenGPS
View Single Post
post #3764 of (permalink) Old 06-22-2019, 04:56 PM
Senior Member
Join Date: May 2011
Location: Manitoba
Posts: 369
Mentioned: 0 Post(s)
Quoted: 97 Post(s)
Originally Posted by Jmay.david View Post
I've found this too. My setup is still on the test bench, but the raw value rolls over to the -ve as well. This in on the button ino over ethernet. BUT, if you change the ino setup to USB serial, then everything works normally. the inos from the dev repository also work fine for me over ethernet and serial.(but I need the IBT2 setup in the button sketch). I've been through the code to try and spot why ethernet causes a change, but I couldn't spot it. Any ideas??
Originally Posted by WW View Post
I had the same issue when I setup my sprayer. Changed the number 3 here to a larger number fixed the issue for me. If I remember right!
steeringPosition = steeringPosition >> 3; //divide by 8
Are you guys using the ADS1115 or the Arduino analog input? In my case, I'm using the Arduino analog input. The two github dev Arduino sketches are both setup for only the ADS1115. One of the main differences between Serial data and UDP packets is that Serial.print sends ASCII chars whereas UDP sends binary byes, I wonder if that is causing some issues.

For example, Serial.print(128) sends 3 bytes:
49 (ASCII for '1')
50 (ASCII for '2')
56 (ASCII for '8')

UDP just sends one byte with a value of 128 (ASCII for '')

AoG has to handle those a little different. If we switched to Serial.write(128) instead of .print, then the Serial data would be handled the same as the UDP(?). Then the Arduino and AoG code could be modular-ized into a common function called by both methods of communication.
m_elias is offline  
For the best viewing experience please update your browser to Google Chrome