Building Section and Machine Control - For Beginners

How do I know which .ino ?
I’m using a Nano for Section Control only

for section control you need the machin_usb_v5_0.ino.

What is the difference between Machine_USB_v5_0 and Machine_USB_v5_5 ?
Also, how do I get the file from GitHub to Arduino ?

5.5?? you mean machine_usb_46.ino

that is the version of de aog you use. if you use the version 5 then you need the v5 machine .ino
if you use aog versie 4.xx then use the machine_usb_46.ino

There is 5_5 also, added 5 days ago.
Where do I find what version of AOG I’m on ? Looking in Properties it says file version 5.4.5.0.

How do I get the file from GitHub to the Arduino Sketch Library ? I don’t have download button, only “go to file” then a list more flies

I am using an 8 relay board, so is that pins D2 to D9 on the Nano ?

Machine_USB_v5_5 this new version for new function implmented by @BrianTee_Admin for define on the software 24 solution … from 5.4.5 and more …

dont take care for now and use the Machine_USB_v5_0.ino

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