To program
the micro-processor you will need to obtain some library files
to handle
the J1939
CAN Bus interface. You should look at this link.
http://ard1939.com
to find out more, and obtain the necessary library files. We
used the Arduino IDE
(Version 1.8.5)
to compile and load the code into the micro-processor. One of
the
files found on this web site is
a demonstration file called
J1939_Gateway.zip.
We
used this as the basis to produce a test
program able to operate the actuator.
The modified version is
available here.
http://www.temporal.com.au/J1939_Gateway_Actuator.zip
If
you compile this code and run it within the Arduino IDE you
can use the Serial
Monitor window
to enter simple commands to move the actuator.
s
= Initiate network scan
0 = Move #0 50 mm (reset motion flag)
1 = Move #1 50 mm
2 = Move #2 100 mm
3 = Move #3 200 mm
The code should be sufficient for anyone to add additional
commands or alter
the commands
already available.
|