• Converting a GitHub Arduino Sketch to a Diagram

    David Lyon6 days ago 0 comments

    When I started working on Kayeiot, I didn't think it would have this particular feature. But I was trying really hard to impress the Competition Judges. And so the feature of being able to Diagram an Arduino Sketch by reading the Code was started.

    If we all had a tool like this, it would make it so much easier to Document all our Arduino and IoT Projects.

    Here is one of the Example Arduino projects that I found. It's location on Github is https://github.com/cranklin/Face-Tracking-Robot/blob/master/arduino/pan_tilt_serial/pan_tilt_serial.ino :

    The first thing to do is to download it and there is some code for that.

    After that is done we have our Arduino Sketch and now we wish to create a Diagram.

    We will need to have some C++ Classes. We created a C++ called ArduinoSketch assigned to process our Arduino Sketches and extract the information out of the Arduino Sketches.

    In the Class we then scan the code to look for what include files are mentioned in the .ino with this code:

    There are lots of details required to create a Graph of an Arduino Sketch. Some of the details about parts will need to be kept in files that can be read sort of like you would in a database lookup.

    We are just using a simple but Open Format .board files for each Part that we want to know about. There will be more about the format of a .board file but here is an example of the small-servo.board file that gives us all the information that we need for Servo's.

    As you can see down the bottom, the #include file for the Servo in Arduino is #include <Servo.h> and the device C++ Class is Servo.

    All the variable names are then read for each of the classes and added as Components to the BOM on the right hand side.

    The end result is that we were able to import the Arduino sketch, determine all the classes, add cables to get the parts connected and print a report.

    Here is the whole process from start to finish. It doesn't take too long, the main thing is to enter the URL of the Arduino Sketch from Github and make sure that all the .board files exist.

    Here's the github link again if you missed it - https://github.com/clixx-io/kayeiot

  • The Beginnings of KayeIoT

    David Lyon08/08/2018 at 09:19 0 comments

    KayeIoT has been built especially for the Hackaday.com 2018 Challenge. Otherwise it probably wouldn't have come into existence.

    It was Started in March 2018, after David worked at a CNC Manufacturer writing C++ Customisations in Qt for LibreCad to support G-Code. Sometime after finishing the job, an idea then arose to write a CAD program specifically oriented towards the needs of Hackers that often work with parts that are already made, instead of insisting that all parts be made from scratch.

    A typical example of what we are talking about would be a Sensor Boards from Sparkfun or some website in China. An Electric Motor, an Arduino board.

    Whilst tools like Fritzing offer some solution, they don't really focus all that well on providing something that could be used in an Industrial Setting. For example, if there was a client requiring a specific Solution and a quick diagram was needed to go into a Quote or Proposition.

    So with this in mind, KayeIoT was discussed and presented on the MakeHackVoid Forum, a Hackerspace in Canberra, Australia here: https://forum.makehackvoid.com/t/open-source-iot-development-ide-and-communicator-for-nodemcu-arduino-raspberry-pi/1379

    An early version is shown here:

    The original requirements really were that it be a Development Environment for GNU Compilers.

    Over time the focus has really changed and it's now very different.