The change from + to - is not OK at all if the mower is not Moving.if the robot is stopped. could it affect?
???mowing area is line
Hi Markor. the only way to solve the problem was to wallpaper. I found a gy 801 module that mounted the hmc5883 compass. I cannibalized it by removing the other modules that did not interest me and I connected it to another i2c port. so the compass works well
@markor.
What is the code in the txt file (It's OK or it's Something you find on th
For compass
If new GY88A use the code from branch GYRO-ONLY
it's also possible to use a GY87.But need change in the code ,so tell me is you have one and i can create a new branch on GitHub for it.
First run of the MMA5883MA Sketch (the text file) sometimes giving good looking values:
x: -509 y: 90 z: -2022
x: -505 y: 91 z: -2022
x: -509 y: 92 z: -2024
x: -507 y: 92 z: -2025
But just reopen the console and it may give good values on just 1 axis or all can be like this:
x: 268774412 y: 549664 z: -1559074975
x: 268774412 y: 549664 z: -1559074975
x: 268774412 y: 549664 z: -1559074975
x: 268774412 y: 549664 z: -1559074975
hello bernard. I am trying these days to make it go on the lawn but it does not work as it should. For the compass I managed to paper as I wrote above. when I have ultrasound and / or the perimeter turned on it has a strange behavior. it advances 2 meters, stops, turns, and advances another 2 meters, and then endlessly. deactivating both works well, cuts in a straight line and does not stop. on the station I still have the azurit firmware. can it create problems? what if i find the right version to upload? I saw that on your code there is written sender heltec, can I load it on the arduino nano even if it includes a display and the wifi module? I also tried to compile it but it gives me errors, perhaps because I don't have the right libraries !!
// perimeter inside/outside detection
if (mag[idx] > 0){
//signalCounter[idx] = min(signalCounter[idx]+1, 3);
signalCounter[idx] = min(signalCounter[idx]+1, 15);
} else {
//signalCounter[idx] = max(signalCounter[idx]-1, -3);
signalCounter[idx] = max(signalCounter[idx]-1, -15);
}
boolean Perimeter::isInside(byte idx){
// if (abs(mag[idx]) > 1000) {
if (abs(mag[idx]) > 500) {
solved ... I didn't realize that on wiki it was written to bypass the c3 capacitor on the amplifier. I bypassed it, the signal almost doubled and I no longer had positive peaks
#define MMC5883MA_OFFSET 32768
#define MMC5883MA_SENSITIVITY 4096
//measurement 1
I2CwriteTo(MMC5883MA, INT_CTRL0, 0x01);
delay(1);
byte mask = 0x01;
I2CreadFrom(MMC5883MA, STATUS, 1, (uint8_t*)buf2);
while ( (buf2[0] & mask) != 1 ) {
I2CreadFrom(MMC5883MA, STATUS, 1, (uint8_t*)buf2);
}
I2CreadFrom(MMC5883MA, 0x00, 6, (uint8_t*)buf);
float x = (uint16_t)(buf[1]<< 8 | buf[0]);
float y = (uint16_t)(buf[3]<< 8 | buf[2]);
float z = (uint16_t)(buf[5]<< 8 | buf[4]);
x = ((float)x - MMC5883MA_OFFSET)/MMC5883MA_SENSITIVITY;
y = ((float)y - MMC5883MA_OFFSET)/MMC5883MA_SENSITIVITY;
z = ((float)z - MMC5883MA_OFFSET)/MMC5883MA_SENSITIVITY;