Difference: ImplementingTheArduinoToolbox (5 vs. 6)

Revision 62019-02-02 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Scilab"

Implementing the Arduino toolbox

The program structure

Line: 39 to 39
 The Arduino has several 10 bit ADCs on chip which can be used to read analog voltage levels. Here is the command code:

Ap: reads the voltage level from analog pin p

Added:
>
>

The multi-function board

In order to test digital read/write, analog read/write etc. we need an Arduino to which the corresponding hardware is connected, e.g. a switch to be read with digital read, a potentiometer for analog read or an LED for digital write... An easy solution is to use the multi-function board which has all these connections already done and which must simply be installed as a piggy back board onto e.g. an Arduino Uno.

multi-function.png

As can be seen from the photo the multi-function board has

Device Connection
4 LEDs GPIO 10..13
2 switches A1..A3
1 potentiometer A0
1 seven segment display GPIO 4,7,8
1 buzzer GPIO 3
For further details please consult the circuit diagram:

https://iotworkshop.africa/pub/Embedded_Systems/ImplementingTheArduinoToolbox/multiFunctionBoard.pdf

I use GPIO pin 2 as TX line for a SoftSerial port onto which I send debugging messages. There is a problem when using this with the PinChangeInterrupt library because both libraries use the same interrupt vectors. Since for our debugging port we only have to send but to not receive message I use the SendonlySoftSerial library attached to this page:

https://iotworkshop.africa/pub/Embedded_Systems/ImplementingTheArduinoToolbox/SendOnlySoftwareSerial.zip

 

The Arduino server program and the test procedure

With this information it is possible to develop the first version of the Arduino server. Since all it needs is input from the serial line we can write a simple C program to test the server. A program asking for the server version (and printing it) as well as the Arduino server are attached to this TWiki page.

Line: 113 to 133
 
META FILEATTACHMENT attachment="loader.png" attr="" comment="" date="1547645846" name="loader.png" path="loader.png" size="11433" user="UliRaich" version="1"
META FILEATTACHMENT attachment="builder.png" attr="" comment="" date="1547645848" name="builder.png" path="builder.png" size="159072" user="UliRaich" version="1"
META FILEATTACHMENT attachment="arduino-linux_1.5-src-v0.4.tar.gz" attr="" comment="" date="1547831976" name="arduino-linux_1.5-src-v0.4.tar.gz" path="arduino-linux_1.5-src-v0.4.tar.gz" size="1844077" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="multi-function.png" attr="" comment="" date="1549099775" name="multi-function.png" path="multi-function.png" size="218191" user="UliRaich" version="1"
META FILEATTACHMENT attachment="multiFunctionBoard.pdf" attr="" comment="" date="1549100057" name="multiFunctionBoard.pdf" path="multiFunctionBoard.pdf" size="23827" user="UliRaich" version="1"
META FILEATTACHMENT attachment="SendOnlySoftwareSerial.zip" attr="" comment="" date="1549100822" name="SendOnlySoftwareSerial.zip" path="SendOnlySoftwareSerial.zip" size="4452" user="UliRaich" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback