Modules and Libraries

In this page, you will find a breakdown of the Biomaker Starter kit, and the accessible XOD libraries available for each part.

The Kit is composed of a Rich UNO board and several modules that you can plug into it. Using those modules with god requires using the patch that go with them. This page will help you find the right patches for the hardware modules in the starter kit.


Libraries native to XOD

A lot of the modules can be used with the libraries and nodes native to XOD.

COMMON-HARDWARE/LED

The Common-hardware/LED node communicates with LEDs. This node is therefore very useful to control the LED and the LED bar available in the kit. This node is fairly straightforward. The ‘PORT’ pod just has to be connected to the right digital pin and the ‘LUM’ pod has to be linked to a command that activates the light.

COMMON-HARDWARE/BUTTON

Same as the LED node, the Common-hardware/Button requires its ‘PORT’ pod to be connected to the digital pin in which you will plug your button.

This node can be used to control the starter kit’s ON/OFF switch or the Open smart TouchSensor. It also activates the TouchButtons integrated on the Rich UNO Board. The Board’s buttons 1-4 are connected to digital pins D3-D6 respectively.

Common-hardware/sd-log

The Mico SD card adapter can be controlled by the Common-hardware/sd-log node.

common-hardware/text-lcd-16x2-i2c

This code works with the open-smart LCD display.

common-hardware/pot

This node works with the Board Potentiometer (analog pin A0) or the Open-Smart slide Potentiometer.

xod-dev/servo/servo

This node will allow you to use a servo.

common-hardware/hc-sr04ultrasonic

this XOD-native node is to be used for distance sensing.

Analog and Digital Generic nodes

Contrary to the nodes presented above, we will here introduce more generic nodes, which means the they apply to many different kinds of hardware modules. First tough, we will introduce some basic electronics concepts. Feel free to skip this paragraph if you are comfortable with the notions of analog vs digital and if you are confident that you can identify which of the hardware parts are generating inputs or requiring outputs.

Analog signals are signals covering a continuous range, and whose number of possible values is infinite. Analog signals are the opposite of Digital signals, whose range are subdivided into discreet numerical values (digits). A metaphor for the distinction between the two is say a digital watch versus an analog watch (with hands). If I look at my digital watch for one minute, I may see it display 14:45 until suddenly it becomes 14:46. If I do the same on an analog watch, I will see the minute hand go over the infinite range of reads in between 14:45 and 14:46.

Most sensors in the kit are analog sensors which means that they provide measured values as continuous changes in voltage variations. Switches that go either on or off, or servos that turn to a discreet number of radians are digital, however.

Pulse-With-Modulation (PWM) is a way to translate analog signal into a digital signal that the micro controller can interpret and use. This is what allows you to dim the brightness of an LED with a potentiometer, even though a potentiometer is an analog input and an LED a Digital output.

Digital-write

Digital-write is a generic node that allows the Board to communicate with the outside. You can use digital-write to activate the Vibration Motor for example

digital-read

DigitalRead reads digital value and can be the starting point to either display, use or record those values. It is used with Digital sensors.

Analog-sensor or Analog-Read

Analog-Read is the same as digital-Read but for Analog sensors. In the starter kit, this node can be used with the Light sensor, the Thermometer, the Potentiometers, the Humidity sensor and the Voltage sensor.

Pwm-write

This node allows for the conversion of Analog signal to Board-readable Digital signal. It has to be used on the digital ports that support PWM, however : find D3, D5, D6, D9, D10 and D11

External Libraries

Adding external libraries in XOD is very simple and painless. To add external libraries, click on the “add library” button on the top left hand corner of the XOD window. Then type the library name in th research bar. One word of caution: the research bar will only find the exact name of the library, so make sure to avoid typos and don’t expect to find external libraries by typing generic components names in there. To find some new libraries, also check out the XOD website libraries page.

Screenshot 2019-05-21 at 13.34.49.png

cesars/rich-uno-r3

Cesar Sosa has created a library to fit the biomaker kit’s components and the rich uno board. He developed a lot of nodes and examples. His library would be a good place to start for everything rich uno board-related.

marcoaita/malibrary

This library has both a node for the buzzer (pin D9 on the Board and external module) and the 7 segment 4 digit display (pins D10 & D11 and external module)

gst/lm75atempsensor

This library works with the temperature sensor of the board with the address 48h

The external spark fun temperature sensor will not necessarily work with this library, hence the usefulness of the analog sensor node presented above

gweimer/ir-remote

Gweimer developed a few nodes and examples to use the remote control and command the board. His nodes work really well and are uncomplicated but you will need to adapt his code a bit either in XD or in C++ if you feel technically apt, as the remote he used is not the same as the kit’s so there is a mismatch in what you press and what it is interpreted as.

Exploring XOD libraries

More libraries exist and are made available by the XOD community. You can browse the library here and find some nodes that may suit your specific needs.

Otherwise the XOD forum also has a ‘I want a node’ topic where members of the community can request more advanced users to build nodes for specific needs. You might try your luck there, or read on the next part to learn how to build your nodes yourselves.

Creating your own libraries

XOD has many resources to help its community create nodes that suit their needs.

The first step in learning how to make new nodes can be found in their ‘getting started’ tutorial here

Then, you can also create more specific and elaborate nodes for XOD in XOD or for XOD in C++ by following the appropriate tutorials.

One last good resource is the “Creating analog sensor driver nodes” tutorial that will help you fine tune nodes for your analog sensors.