Difference: ImplementingTheArduinoToolbox (4 vs. 5)

Revision 52019-01-18 - UliRaich

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

Implementing the Arduino toolbox

The program structure

Line: 34 to 34
 Sm: moves the stepping motor by 1 step

Sc: Clears all coil signals to low

Added:
>
>

Reading analog values

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

 

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: 59 to 64
  A tar archive with a Xcos toolbox containing Digital Write as well as as a basic stepper motor xcos block is attached to this page:
Changed:
<
<
https://afnog.iotworkshop.africa/pub/Embedded_Systems/ImplementingTheArduinoToolbox/arduino-linux_1.5-src.tar.gz
>
>
https://afnog.iotworkshop.africa/pub/Embedded_Systems/ImplementingTheArduinoToolbox/arduino-linux_1.5-src-v0.4.tar.gz
  This is the original arduino_1.5-src archive downloaded from git which I modified to run on Linux. Only Digital Write and the stepper motor module are working. The other modules are still part of the archive but will most probably not work. In the original archive the stepper motor block was removed from the Arduino palettes. It has been put back. The original Arduino sketches have been moved into arduino.old and a new server sketch developed which you find in the arduino folder.
Line: 87 to 92
  loader.png
Changed:
<
<
Now you can start xcos either by typing xcos in the command window orr by clicking the Xcos icon (the one looking a bit like an oscilloscope). In the palettes box coming up you should see an Arduino entry:
>
>
Start xcos either by typing xcos in the command window or by clicking the Xcos icon (the one looking a bit like an oscilloscope). In the palettes box coming up you should see an Arduino entry:
  palette.png
Changed:
<
<
Now you can create a diagram using your new Arduino blocks and run it. The LED should blink or the stepper motor move.
>
>
Now you can create a diagram using your new Arduino blocks and run it. You can blink LEDs with the digital output block, read switches with the digital input block, read analog values or make a stepper motor move.
  -- Uli Raich - 2019-01-07
Line: 104 to 109
 
META FILEATTACHMENT attachment="serialLib.png" attr="" comment="" date="1547562536" name="serialLib.png" path="serialLib.png" size="23041" user="UliRaich" version="1"
META FILEATTACHMENT attachment="stepper.png" attr="" comment="" date="1547562537" name="stepper.png" path="stepper.png" size="15446" user="UliRaich" version="1"
META FILEATTACHMENT attachment="blink2.png" attr="" comment="" date="1547563216" name="blink2.png" path="blink2.png" size="63326" user="UliRaich" version="1"
Deleted:
<
<
META FILEATTACHMENT attachment="arduino-linux_1.5-src.tar.gz" attr="" comment="" date="1547645323" name="arduino-linux_1.5-src.tar.gz" path="arduino-linux_1.5-src.tar.gz" size="1841722" user="UliRaich" version="1"
 
META FILEATTACHMENT attachment="palette.png" attr="" comment="" date="1547645846" name="palette.png" path="palette.png" size="30131" user="UliRaich" version="1"
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"
Added:
>
>
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"
 
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