Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Arduino details
Login with GitLab

Arduino

Arduino Communication through Serial
(6676 downloads for this version - 254001 downloads for all versions)
Details
Version
1.6
A more recent valid version with binaries for Scilab 6.0 exists: 1.8
Author
Bruno JOFRET
Owner Organization
Scilab Enterprises
Maintainers
Samuel Gougeon
Yann DEBRAY
Bruno JOFRET
Categories
License
Creation Date
May 30, 2019
Source created on
Scilab 6.0.x
Binaries available on
Scilab 5.5.x:
Windows 64-bit Windows 32-bit
Scilab 6.0.x:
Windows 64-bit Windows 32-bit
Install command
--> atomsInstall("arduino")
Description
            
This toolbox provides Arduino communication blocks for Xcos.

Communication is performed through Serial port.

The Arduino board must be flashed with the file toolbox_arduino_v4.ino
(shipped in the module and downloadable from the ATOMS page).

TUTORIALS (in english)
----------------------
* Blinking LED Tutorial: 
https://atoms.scilab.org/toolboxes/arduino/1.5/files/Scilab_Arduino_Blinking_LED_Tutorial.pdf
* Temperature monitoring Tutorial:
 https://atoms.scilab.org/toolboxes/arduino/1.5/files/Scilab_Arduino_Temperature_monitoring_Tutorial.pdf

RESOURCES
---------
* toolbox_arduino_v4.ino:
  http://atoms.scilab.org/toolboxes/arduino/1.5/files/toolbox_arduino_v4-1.ino
* Demosciences project (in french):
  http://www.demosciences.fr/projets/scilab-arduino

NOTE
----
* toolbox_arduino_v4.ino is shipped within the toolbox, including the
  MPU6050 bloc and filtering. Thanks to David VIOLEAU.
* etc/arduino-style.xml is partly provided (but it does not (yet) work).

CHANGES 1.5 => 1.6
==================
 BUGS FIXED
 * toolbox_arduino_v4.ino file shipped in the module was bad.
   Replaced with the right file.
 * ARDUINO_pre_simulate() was expecting arduino_v3.ino instead of 
   arduino_v4.ino and yielded an error 'Il faut charger avec le logiciel
   arduino le sketch toolbox_arduino_v3.ino dans la carte Arduino'
   when actually dealing with the v.4
 * The DESCRIPTION file that was removed from v.1.4 is actually 
   needed to instal the module offline. Restored.
 * Demos: Examples for Scilab 6.0 are displayed with wrong ports 
   positions with Scilab 5.5. The versions for Arduino 1.1 are 
   restored in the binary for the Scilab 5.5.
  
TODO:
  * Extend the module to Linux users (through the serial toolbox based on TCL)
  * Translate help pages in english
  * Translate blocks interfaces and error messages
  * Translate demos
            
Files (5)
[781.12 kB]
Source code archive

[992.66 kB]
Windows 64-bit binary for Scilab 5.5.x

[992.66 kB]
Windows 32-bit binary for Scilab 5.5.x

[1.04 MB]
Windows 64-bit binary for Scilab 6.0.x

[1.04 MB]
Windows 32-bit binary for Scilab 6.0.x

News (0)
Comments (2)     Leave a comment 
Comment from Samuel Gougeon -- May 31, 2019, 07:19:10 PM    
Some user tells me that this 1.6 version still fails, for the same reason
'Il faut charger avec le logiciel  arduino le sketch toolbox_arduino_v4.ino dans la carte 
Arduino'
I am sorry, but i have no Arduino card to test the patch pushed in the 1.6 version.
Could anyone confirm that it works or fails?
If it fails, you can do the following to know more about the reason:
edit("ARDUINO_pre_simulate",40)
// then just after the line #40
                if tcur>=2 | values ~='v4' then
// insert a pause or disp(tcur, values) to inspect or display variables triggering the 
error
// and execute the macro to redefine ARDUINO_pre_simulate()

and please report your results here.

Thanks
Samuel
Comment from FELIX RUIZ -- June 2, 2019, 06:32:38 PM    
Hello. I used the ino file at the "Description"

* toolbox_arduino_v4.ino:
  http://atoms.scilab.org/toolboxes/arduino/1.5/files/toolbox_arduino_v4-1.ino

And this was shown at the prompt:

 communication with card 1 on com 4 is ok

 Version arduino_v4.ino utilisée

 Fin pre_simulate arduino

 Acquisition en cours...
msprintf: Wrong number of input arguments: data doesn't fit with format.

 do_eval: Error while calling block ARDUINO_DIGITAL_WRITE [uid='1f0a1f18:16b18f02fd2: 
 -7ff2']: invalid parameter (ier=999.000000, %scicos_prob=%F).    

Then I used the ino file that came in the toolbox arduino_1.6_60-bin.zip and this was 
shown at the prompt:

 communication with card 1 on com 4 is ok

 Error occurred in pre_xcos_simulate: Cancelling simulation.
 at line 65 of function pre_xcos_simulate

And a window appeared with the message:

'Il faut charger avec le logiciel arduino le skecth toolbox_arduino.ino dans la carte 
Arduino'

Then, I added the code at line 41 in the ARDUINO_pre_simulate.sci

                if tcur>=2 | values ~='v4' then
                    disp(tcur, values)

And the following was shown at the prompt:

 communication with card 1 on com 4 is ok

 v42t

   0.0015597

 Error occurred in pre_xcos_simulate: Cancelling simulation.
 at line 66 of function pre_xcos_simulate
Answer from Samuel Gougeon -- June 4, 2019, 12:16:14 AM    
> Hello. I used the ino file at the "Description"
> 
> * toolbox_arduino_v4.ino:
>   http://atoms.scilab.org/toolboxes/arduino/1.5/files/toolbox_arduino_v4-1.ino
> 
> And this was shown at the prompt:
> 
>  communication with card 1 on com 4 is ok
> 
>  Version arduino_v4.ino utilisée
> 
>  Fin pre_simulate arduino
> 
>  Acquisition en cours...
> msprintf: Wrong number of input arguments: data doesn't fit with format.

It is very hard to know where this error happens...
Let you fix the following and see if it fixes this msprintf issue as well.

>  do_eval: Error while calling block ARDUINO_DIGITAL_WRITE [uid='1f0a1f18:16b18f02fd2:

>  -7ff2']: invalid parameter (ier=999.000000, %scicos_prob=%F).    
> 
> Then I used the ino file that came in the toolbox arduino_1.6_60-bin.zip and this was

> shown at the prompt:
> 
>  communication with card 1 on com 4 is ok
> 
>  Error occurred in pre_xcos_simulate: Cancelling simulation.
>  at line 65 of function pre_xcos_simulate
> 
> And a window appeared with the message:
> 
> 'Il faut charger avec le logiciel arduino le skecth toolbox_arduino.ino dans la carte

> Arduino'
> 
> Then, I added the code at line 41 in the ARDUINO_pre_simulate.sci
> 
>                 if tcur>=2 | values ~='v4' then
>                     disp(tcur, values)
> 
> And the following was shown at the prompt:
> 
>  communication with card 1 on com 4 is ok
> 
>  v42t
> 
>    0.0015597
> 
>  Error occurred in pre_xcos_simulate: Cancelling simulation.
>  at line 66 of function pre_xcos_simulate

This should be "definitively" fixed in the 1.6.2 version.
Please try and report your result.
Thanks
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.