Training Session 1:

Introduction to programming the Arduino micro controller using the XOD visual programming interface.

1. Introduction to hardware

In this first session teams will be introduced to Arduino microcontroller boards. The boards contain a microprocessor with embedded interface circuits, including non-volatile memory. The devices can be powered directly from a USB port, which also allows software running on a laptop to be compiled and then dumped as a single programme (or "sketch") into the microcontroller memory. This is a very simple form of computer, with only one programme and no operating system. For biologists, the process of dumping code into the microcontroller is not so far from the process of constructing a DNA circuit and dumping this into a cell.

Participants in the Biomaker Challenge will be given an UNO Arduino board, and a Gtronics Proto Shield Plus chassis as part of their Starter Kit. The latter allows mounting of the Arduino board and shield (see below), and provides a 2x16 character LCD display, control switches and a plug board for prototyping new circuits. We wish to keep the training sessions open for all interested - and we can loan hardware to folk who are not already Biomakers. In addition, the hardware is relatively inexpensive and is readily available for purchase online.

Background information about Arduino boards can be found online at https://www.arduino.cc

2. Introduction to XOD

XOD is open source software that can be used to programme the Arduino micro controller board. It uses a graphical interface that represents hardware and computing elements as nodes that can be wired together to allow data flow between the objects. We think that this provides a simple way for non-programmers (i.e. biologists) to develop useful skills and understanding - without needing to deal with the complications of programming languages and syntax. 

There are variety of introductory lessons for XOD, available at: https://xod.io/docs/tutorial/ - an example is shown right.

Simply install the cross-platform XOD software, assemble and plug in the hardware, and you can get started directly. In addition to these introductory exercises with minimal hardware, we will be running sessions with extended componentry, that we will build on during the training course.

  1. Hello

  2. Upload to Arduino

  3. Pins, data, and the Inspector

  4. Fractional numbers and PWM

  5. Wiring configuration

  6. Adding nodes

  7. Node labels

  8. Constant nodes

  9. Input from a potentiometer

  10. Doing math

  11. Controlling servos

  12. Accessing help

  13. Mapping values

  14. Adjusting map range

  15. Buttons

  16. Logic nodes

  17. Reading lightness

  18. Comparing numbers

  19. If-else branching

  20. Smoother changes

  21. Pulses

  22. Clock

  23. Pulse counting

  24. Flip-flop

  25. Using multiple timelines

  26. Showing text on LCD

  27. Displaying sensor values on LCD

  28. String concatenation

These tutorial exercises can be run outside of the Biomaker training sessions - to give a fuller range of experience with the programming interface and nodes. The required hardware can be found in the Starter Kit.

 UNO compatible Arduino board

UNO compatible Arduino board

Gtronics Proto Shield Plus for Arduino prototyping, shield expansion and LCD display

 Find more information about XOD at  https://xod.io/docs/

Find more information about XOD at https://xod.io/docs/

 Keyestudio Multipurpose shield for Arduino

Keyestudio Multipurpose shield for Arduino

3. Building with software

We will provide a software library that provides XOD nodes for components present on the Keyestudio Multipurpose Shield V1 (right) and the LCD display and switches on the ProtoShield Plus (above). The use of these devices means that there is no need to struggle with error-prone wiring of circuits at this introductory stage. We will demonstrate:

(i) How to set up your laptop with the XOD software and connect the hardware. This will also be used as a platform for subsequent training sessions.

(ii) How to use simple devices like switches, variable resistors and LEDs to provide inputs and outputs for software programmes.

(iii) How to write information to the LCD screen for display, and how to toggle between display modes using the embedded array of switches.

(iv) How to read values from a sensor, and display these in real time.

(v) We will finish the session with a small scale programming challenge.

Reference materials

 Download Arduino UNO and Multipurpose Shield pinouts ( PDF, 1 MB )

Download Arduino UNO and Multipurpose Shield pinouts (PDF, 1 MB)