individual Ringo idendification ?

Ringo setup, hardware, basic programming. User to user support.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
didier
Posts: 1
Joined: Sun Nov 29, 2015 9:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

individual Ringo idendification ?

Postby didier » Mon Nov 30, 2015 10:20 am

Hi,
I have two Ringos on which I would like to run almost the same code.
I would prefer to have only one code file, and just modify a few lines
or parameters on each robot. I thought I could do that for example reading some
serial number/identifier on the Ringo and using an if statement
- is there already a Ringo serial number/identification which can be read from the Arduino
code (if yes how to read it) ?
- if none is built in, is it possible to use the trick of writing once a code
in the EEPROM as described in the post by HCF on this page
http://forum.arduino.cc/index.php/topic,45104.0.html
without breaking other Ringo software ? I have seen for example that
there is at least already a variable, GYROSCOPE_CALIBRATION_MULTIPLIER_DEFAULT, written
at GYRO_CAL_MULT_ADDRESS 1020 (in Navigation.h)
Are there parts of the EEPROM which can be used for this purpose without damage ?
Many thanks in advance for your advice
PS some example(s) of interaction between Ringos (or Winks) would be a nice addition to the Guide

Kevin
Posts: 180
Joined: Tue Jul 28, 2015 12:56 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: individual Ringo idendification ?

Postby Kevin » Fri Dec 04, 2015 3:39 am

Hello didier,

Sorry it took a while to get back to you.

You can certainly use the EEPROM. The only suggestion is that you avoid the address 1020 as that's a designated holding spot for the gyro calibration if you use it.

Whenever you upload code to Ringo, it erases the normal flash memory and over-writes it each time, but it does not erase the EEPROM - it should stay forever unless you use a more advanced programmer with options that specifically erase it.

There is no other code stored in EEPROM so you can feel free to use it for whatever you'd like. As you discovered the code to write the gyro calibration (and also to read it) you can use that as an example.

If you or anyone else needs it, the official EEPROM function reference at Arduino is here:
https://www.arduino.cc/en/Reference/EEPROMWrite

Thanks!
-Kevin


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 33 guests