Arctic Hare mod by Jussi

Sorry, I forgot completely different folders. I use vscode with platformio ide. Anyway, compile ardumower/src folder. You have to change ardumower.cpp to ardumower.ino if using arduino ide.
Hello
Thanks. That was the point i missed. Today i tested your code. I am at the beginning. Uploaded to due - factory reset - searching for good settings.
First point was that i keep 2 mow motors on. I have 2 motors but only one controller. They are running together. But i found your setting secondMowMotor = false;
So this point is ok now.
Now i have the problem that the mower do not stop on wire. He moves over without stopping. But when i go to command "Back to station" he follow the wire. So the perimeter is working. Today i have to stop now my testing. I think i have to play with all the new parameter.
Thanks and best regards,
Bjoern
 
secondMowMotor = true, if you have two motors. If it's false, second motor turning because input pwm is parallel but power feedback (sense) is separate and there's no overcurrent protection for second motor.
 
secondMowMotor = true, if you have two motors. If it's false, second motor turning because input pwm is parallel but power feedback (sense) is separate and there's no overcurrent protection for second motor.
Hello
I don't know if understand it right but I have 2 mow motors in parallel connected together to one motor controller.
My max power setting is 40W. This is working pretty nice last 2 years.
When I setup in your code second mow motor=true my mow motor are not starting because the sense value of motor 2 is much higher then my 40W also without starting mowmotor. Also when I start with command mow random the mower starts in the same second with circle or error.
But with second mow motor=false everything run normal.
Today your code let him mow 113min without any problem.
Next step will be to fill the code with my rfid tags.
Best,
Bjoern
 
This is a nice solution. But up to now i am happy with my simple one :)
Is your RFID part in due good working in your mower?
Today it is raining here :cry:
 
Hello
I have a lot of warning during compile:
Code:
sketch\flashmem.cpp: In member function 'byte* FlashClass::readAddress(uint32_t)':

sketch\flashmem.cpp:79:8: warning: address of local variable 'd' returned [-Wreturn-local-addr]

   byte d = readAT24C32(address);

        ^

sketch\drivers.cpp:31:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

 char *dayOfWeek[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};

                                                                     ^

sketch\drivers.cpp:31:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\drivers.cpp:31:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\drivers.cpp:31:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\drivers.cpp:31:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\drivers.cpp:31:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\drivers.cpp:31:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

                       "DRIVE2TONEWAREA", "WAITSIG2", "STOPTONEWAREA", "ROLLSTOPTOTRACK", "STOPTOFASTSTART", "CALIBMOTORSPEED", "ACCELFRWRD"};

                                                                                                                                            ^

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:68:140: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

                        "SIGWAIT", "WIREMOWING"};

                                               ^

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:71:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:73:60: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

 char *mowPatternNames[] = {"RAND", "LANE", "WIRE", "ZIGZAG"};

                                                            ^

sketch\robot.cpp:73:60: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:73:60: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:73:60: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:74:89: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

 char *consoleModeNames[] = {"sen_counters", "sen_values", "perimeter", "off", "Tracking"};

                                                                                         ^

sketch\robot.cpp:74:89: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:74:89: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:74:89: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp:74:89: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

sketch\robot.cpp: In member function 'virtual void Robot::checkSonar()':

sketch\robot.cpp:4951:37: warning: large integer implicitly truncated to unsigned type [-Woverflow]

     setBeeper(2000, 500, 500, 60, 60);

                                     ^

sketch\robot.cpp:4951:37: warning: large integer implicitly truncated to unsigned type [-Woverflow]

Is it normal or are i doing wrong?
Thanks,
Bjoern
 
Hello
Short feedback: RFID part works great with 13 tags in my garden. Thank you.
One point i have from time to time: Sometimes when i go to Setting with my bluetooth connection and change something and
after going back the Save button is gone. After restart the due it is back but i lost the new setting.
It is not important but do you have seen this also?
Thanks and best regards,
Bjoern
 
Save button is visible only in states: 'state_off', 'state_station', and 'state_station_charging'. Maybe this explains why the button disappears.
 
Hi,
I've been following this project for a while and I'm very excited about it.
I use the last firmware from Bernd.
In the Rand the Ardumower works very well.
But in lane I have a problem that I couldn't solve.

After 1 hour he only mowed the strip.
After each calibration, it changes direction again and mows the strip again.
Can I change that somehow?
Or do I have another problem?
Sorry for my English, it`s google translate.
 

Anhänge

  • IMG_0351.JPG
    IMG_0351.JPG
    5,5 MB · Aufrufe: 26
English is perfect.
After each calibration, it changes direction again
Yes sometime but maybe i have remove this behaviour in the last 1.3 version
Please test with the last 1.3 version or see with Jussip to add the last change.
If you use Pi you need the last Piardu323 (in test actualy) with the new robot.py and pyc file to work with 1.3 firmware and Access point or correct WIFI connection.


Don't forget to adjust the Bylane setting .

Into arduremote
First into info set develloper to yes
Start the mower in bylane mode.
Now into setting by lane setting:
At beginning leave the fixed yaw1 , 2 and 3 on factory setting.
Now when the mower is back change the yaw Opposite and normaly you can adjust the lane to have it parallel ( or more out) to be sure the mower Don't run again on the same lane.(it's real time reaction so you see imediatly the result on mower heading)
Now click on change next roll dir and repeat the process again but only for opposite yaw.(not on fixed YAW)

Do this for the 3 lanes.

Also into setting imu set the delay between 2 calib at maximum
Reduce the Speed to find comYaw


And maybe make a video of the calibration process with changing direction.

Very old video :
 
Zuletzt bearbeitet:
Hello Bernd,

thank you!
I tested the 1.3 firmware today. I was able to adjust it perfectly with your instructions. He mowed the path perfectly for 30 minutes.
and then he started turning to find yaw, over and over again.
I am not sure if I have calibrated the IMU correctly.

And Rand doesn't work at all.
after 1-2 m beeps and then turns. I can't see why. I think sonar, bumper and perimeter is okay. It also worked in lane.
 
It has nothing to do with my problems, but the PI tries to ping.
Then the Ardumower sreen freezes. (Not the Raspberry Pi)
After a restart it works again until the ping.
Do I have to change anything?
 
he started turning to find yaw, over and over again.
Compass is not correctly calibrate.
Redo the Compass calibration (Not Gyro)
It's not easy but you need to do it again. And move all the mower arround all axis (Use Pi console or PC console to see new data and the end of calibration)
Set the delay between calibration to minimum (60 secondes) and check for 3 or 5 minutes if calibration work every time.
Mower nedd to roll a little, wait 4 secondes, and continue to mow with compass and gyro aligned.
If ok set it again to 600.
I test it yesterday and no problem for me with a calibration each 2 lanes.

For the PI (It's really better to use it for console check)
What is PING for you ???
To be sure
You need to use VNC Viewer and use python3 Idle to start Pyardu320 or later to see the message.
Into Pyardu Console you can easily understand what's append when the mower reverse.
And if piardu freeze check the python shell.
When i add the MQTT support i also increase the mower dependence from internet and i also see that sometimes the Pyardu freeze on startup or after 15 or 30 secondes.
But after started it work non stop
Here a screen copy of the wire mowing console after 5 days mowing without reset.
Capture.JPG
 
@ jussip
Thanks that was also my first thought.
I checked that.
Bernd is right, I have to recalibrate.

@ Bernd
ping is the ip ping test for me.
I forgot to change the address of the Mqtt broker.
Now that works again.

I use Mobaxterm to check. Here I can see that the camera is not working.
I do not know why. I don't need it at the moment.
Now I'm going to calibrate th IMU and than the next step.


IMG_0356.JPG
 
'STATE_REVERSE' is not used? When mower bumps something is it 'STATE_PERI_OUT_REV' what is used for reverse? and 'DistPerioutRev' is variable for that. 'DistPeriObstacleRev' is not actually used anything?

I have few tight spots and mower reverse outside, then it can't roll back in. I'm thinking if reverse can be e.g. 1/3*DistPeriOutRev when mower is inside.
 
Mobaxterm is perfect to DEV because it's full screen mode.
I Always use it with python idle3 to write the code.
You need to set execute permission to the file streamvideo,poweroff etc.….. (in fact all the file in the folder to be sure)
It' s in red in the console :LOL: :LOL:
I post new code for DUE "not tested" (now if the compass is not calibrate the mower can run in random mode).


I have to work again on the piardu code because today i did some test in my garden at a location with bad wifi and many piardu freeze occur.
By chance i have a screen on pi and i can use the soft without WIFI but i need to understand what append with the wifi and serial issue !!!:mad:


@jussip
Do you have idea on the Piardu freeze issue ?
It's Strange for me ,If i start the mower out of the wifi cover area ,All is OK but when the mower move near the router it's like if raspian stop the serial com to connect the wifi and piardu freeze !!!!!
 
Zuletzt bearbeitet:
'STATE_REVERSE' is not used? When mower bumps something is it 'STATE_PERI_OUT_REV' what is used for reverse? and 'DistPerioutRev' is variable for that.
Yes it's old parts of code STATE_REVERSE is not use actualy

DistPeriObstacleRev' is not actually used anything?
It's use in STATE_PERI_OBSTACLE_REV when mower track the wire and bump on Something.

I have few tight spots and mower reverse outside, then it can't roll back in. I'm thinking if reverse can be e.g. 1/3*DistPeriOutRev when mower is inside.
It's little complex but possible to change form state STATE_PERI_OUT_REV to STATE_REVERSE when mower detect perimeterinside and use only 10 cm to brake but need to test for long duration and many posibility of rev.


What's append if you reduce the DistPerioutRev --> (Rev Distance / Perimeter) into setting motor ?:unsure:
 
Check syslog, if there are lines:
Code:
... brcmfmac: brcmf_cfg80211_scan: scan error (-110)
... brcmfmac: brcmf_run_escan: error (-110)
Then it's buggy Broadcom drivers. Only option, for now, is to use different wifi chipset. e.g. dongle with Atheros chipset works fine
 
Oben