Building Section and Machine Control - For Beginners

Perfect thanks.
How do you get the files from GitHub to the Arduino Library ?

do you download the support files ?

after unzip it

and click on the prog to load on arduino IDE ā€¦
check this video the first 2 minute it is show in reality how transfer the prog to arduino board (it is autosteer prog but concept is same)

I see the download option now, I needed to press the ā€œcodeā€ button.

same as video if you transfert it wil compilate it !

That video doesnā€™t show downloading from GitHub but I got there in the end :+1:t2:. Relay board connected up and working :ok_hand:

the most important is you achieve it

Why canā€™t I get the first relay to operate ? Relay 2,3,4 work fine ? I have a 4 relay module, 4 sections setup in AOG. Sections on AOG operate fine relays 2,3 and 4 operate fine but relay stays on. Iā€™ve tried with the Uno and the Nano and 2 different relay boards

hello on arduino code
image

so it means
section, 1 is output D2
section, 2 is output D3
ā€¦
section 4 is output D6ā€¦

could change the pin out

This is what I have, so I Have relay 1 connected to D2, relay 2 connected to D3, relay 3 connected to D4, and relay 4 connected to D5

//change the pin number as reguired (pinDā€”
digitalWrite (2, bitRead(relayLo, 0)); //se
digitalWrite (3, bitRead(relayLo, 1) ) :
digitallrite (4, bitRead (relayLo, 2)) :
digitalWrite (5, bitRead (relayLo, 3) ) :
digitalWriteā€™ (6, bitRead (relayLo, 4) ) :
digital/rite (7, bitRead (relayLo, 5) ) :
digitalWrite (8, bitRead (relayLo, 6)) ;
digitalWrite (9, bitRead (relayLo, 7)

Ditgital wire was originally 13 but I changed it to 2, but still didnā€™t work, rebooted everything, now itā€™s working

Hi, Iā€™m using the Machine_USB_v5_0.ino file and itā€™s perfectly working with the 8 units relay board. I wanted to play a little with the code to be able to control the relay board with AOG and toggle switches as well. Now I can control it with switches, but I couldnā€™t find out how can I update the section state in AOG. Can someone send an example bitWrite() command which works this version? Thanks

Look here, a good example for all you need:

https://github.com/Xilofeon/Section-Control-for-AgOpenGPS/releases/tag/v1.1.4

thread is:
https://discourse.agopengps.com/t/section-control-by-switch/4750/6

1 Like