Sunday, February 21, 2016

Git Hub repository for design

Hi folks.

I've created a Git hub repository for the design files and code for the robot.

Here it is: --> https://github.com/fixstuff/MDRobot

Inside the "Board Files" folder, there are the gerber and design files for the Teensy-based PLC mother board.

Inside the "Source Code" folder, there is the Codesys Project archive, which includes libraries.  This archive is in 7 parts, due to Github size restraints.  Also in this folder is the python script for accessing the GPS data on the Ultimate GPS hat, and the Teensy sketch for the I2C slave and interfacing functions.

There is a lot of good stuff here.  For example, the Codesys project includes my custom device parameter file that allows a generic I2C driver to talk to many different I2C devices.  To date, I've tested over 20 different I2C devices.  Included with the project is code to talk to the Teensy I2C slave, and the Adafruit 10 DOF IMU.  There is also code to talk to the 4 ch I2C DAC chip on the PLC motherboard.  All of this uses that I2C driver.

There is also good code samples in the project including the GUI with embedded video, Modbus client and slave access code, access to the Linux system from Codesys, Real time Clock functions, building automation functions, Serial port access functionality, just to name a few.

The Teensy sketch is useful also.  It uses the I2C slave library, and demonstrates several useful techniques such as task management using elapsed millis, and other tricks.

The gps python script is useful as well, since I added a Modbus TCP data interface to pass the GPS data into the Codesys via Modbus.  This is useful in several ways.  It can allow you to transfer information from Linux into the Codesys runtime (since there is no SDK), and this can be used both locally, or over a network.  This same mechanism can be used for any code running in the Linux system, not just Python, you would simply download the widely available open source Modbus libraries available for whatever language you need.  This is a very easy way to bring data into Codesys on the Pi.

I will be adding more folders as I go along.  The next folders will be the power subsystem, the Metal detection subsystem, and the control subsystem.

No comments: