paddygoat / WEEDINATOR

WEEDINATOR agricultural robot files
https://hackaday.io/projects/hacker/184263
27 stars 9 forks source link

Pixy2 and panError #14

Closed paddygoat closed 6 years ago

paddygoat commented 6 years ago

@SlashDevin I've been trying to get the Pixy2 up and running, but the vector info does not seem to reach the TC275. I'm not sure why this is, or if it's because the machine is stationary or not - it's difficult to test if the machine is moving!

I suggest that we transmit a variable called 'panError' from the Mega to TC275 which will make all the code much clearer with no need to use the term 'compass' anymore. panError describes the amount that the steering needs to rotate to correct the perceived error in direction of travel. In terms of GPS navigation, it's equivalent to (heading - bearing).

I suppose now would be the time to also activate the 'use GPS' command which will look like this: "GPS", "PIXY" and "JETSON" from the hdgSrc column in the database.

For now, the data will look like this: LAT533027200LONG-42398365PIXY

By the way, I don't see any current use for the compass module, so it can be completely de-activated.

Thanks!

SlashDevin commented 6 years ago

The Pixy panError variable is now transmitted from the Mega to the TC275. You need to decide what to do with it in TC275.ino. You can grab the panError value out of the `navData message here. I assume that it needs to go in a global variable, like the other values.