2019

Talking at the European Xojo Developer Conference, organized by Monkeybread Software



This year the 12th European Xojo Developer Conference, organized by Monkeybread Software, was held in Cologne on 24th and 25th October 2019. I gave a talk on the subject: Data acquisition and data processing with Arduino and Xojo. Thanks to my son for helping me preparing the electronic circuits which I used during the presentation. Also many thanks to Christian and Stefanie from Monkeybread Software for organizing the conference. It was nice to meet software and hardware developers from all over the world.

Tutorial: Controlling RGB LED with Arduino and Xojo

Today we control an RGB-LED with Arduino and Xojo:

- First, you need to build the circuitry as shown in the picture below.
Sketch_RGB_LED_bb

- Donwload the required Arduino and Xojo project files here (https://no516.com/dl/Control_RGB_Led.zip).
- Unzip the donwloaded project files.
- Connect the Arduino to your computer using an USB cable.
- Open the Arduino project file in the Arduino IDE and upload the project to the Arduino board.
- Open the Xojo project file and run the project in the Xojo IDE.
- When the application starts, you have to connect to correct the serial port (select the port from the popup menu and press the „Connect“ button)
- Now you can control the different colors of the RGB-LED with the three silders.

Screenshot_Control_RGB_LED
To control the RGB-LED we simply call the folowing code whenever one of the three sliders gets moved:

SerialController.Write("<"+ Str(Slider_Red.Value) + "," + Str(Slider_Green.Value) + "," + Str(Slider_Blue.Value) + ">")

Note that we use the “<“ and “>” symbols as start an end markers for the command that we send to the Arduino board. This is how the Arduino will know where a command begins and ends. The values of the sliders are separated by commas. On the Arduino board we use special code to parse the received message.

Tutorial: Controlling LED with Arduino and Xojo

It is quite easy to contral 3 LEDs with Arduino and Xojo:

- First, you need to build the circuitry as shown in the picture below.
Sketch_Arduino_3_LED_bb
- Donwload the required Arduino and Xojo project files here (https://no516.com/dl/Control_Led.zip).
- Unzip the donwloaded project files.
- Connect the Arduino to your computer using an USB cable.
- Open the Arduino project file in the Arduino IDE and upload the project to the Arduino board.
- Open the Xojo project file and run the project in the Xojo IDE.
- When the application starts, you have to connect to correct the serial port (select the port from the popup menu and press the „Connect“ button)
- Now you can enable the red, yellow and green LED (or turn them all off) by pressing the corresponding button.
Screenshot_Control_LED
To enable the red LED we simply need to put this code in the „Action“-event of the button with caption „RED“:

SerialController.Write("r")

This command will send a single character through the serial port to the Arduino board.

To enable the yellow or green LED we use:

SerialController.Write(“y”)
or
SerialController.Write(“g”)

To turn all three LEDs off, we send the chracter „o“:

SerialController.Write(“o”)