Go Down

Topic: Trying to run OpenScale on the Due (Read 323 times) previous topic - next topic


I am new to the Arduino world and enjoyed getting to know the Open Scale system that has the Uno on it.

I would like to report data at a higher frequency than the 11 Hz of that system.

So now I have the Due baord and the Load Cell amp all wired up.

I am trying to load Open Scale from Github and find myself a little lost.

I have downloaded the raw data files into a folder on my PC.

I am a mechanical guy in the software world and am guessing that anything in the sketch that has an
#include <xxx.x> means that I need to have an xxx.x file in my same folder?

When I go to compile OpenScale, it reverences <EEPROM.h> which then references <avr/eeprom.h>.

I can not find  <avr/eeprom.h> to download

Any suggestions?
  Have I missed the big picture and am fundamentally flawed in trying to run the OpenScale software that runs on the Uno on the Due?

Where might I find <avr/eeprom.h>?

Any other knowledge that can be shared that a newbie might find helpful.



Provide the URL to the library you are working with. There is a good chance that a library dedicated to the UNO won't work on a DUE.

The DUE has 512 bytes of EEPROM from the 16U2 uc, but not very convenient to leverage:

Depending on the number of bytes you have to save and the update frequency, you may have several possibilities:

- DueFlashStorage library to save lots of bytes inside the DUE Flash memory (although not a valid option if you modify them very frequently)

- 5 GPNVM bits (bits not bytes) if you need to save very few data and not too frequently

- An external FRAM breakout board for fast data logging with a high update frequency

- An external SD card .....


Might I have an opportunity with the bootloader?
Is EEPROM.h specific to avr/UNO?
Do i need a bootloader for the ARM/Due

Has someone already run a version of OpenScale on the faster Due tha might be available?


Thanks ard_newbie,
Just saw your answers and am digesting now

Now waiting my 5 minutes in between posts for being a newcomer

I was trying to get the Open Scale from https://github.com/sparkfun/OpenScale


I saw Steve K from Australia on another forum got the Open Scale (I think the the Uno) running at 160 Hz.

I may try to work with the Uno/Open scale and see if I can get it going faster than the 11 Hz that it is currently doing


In the OpenScale sketch, EEPROM is used to store the scale's settings. EEPROM is non-volatile memory, which means that after you turn off the scale and turn it back on it will remember your settings.

The DueFlashStorage library looks like a good option. You should be able to convert the code to using that library by changing OpenScale.ino line 63 from:
Code: [Select]
#include <EEPROM.h> //Needed to record user settings
Code: [Select]
#include <DueFlashStorage.h>
And then replacing all instances of "EEPROM." in System.ino with "dueFlashStorage."

As ard_newbie mentioned, you need to be careful not to write to flash too often, as it's usually rated around 10000 writes (The Uno's EEPROM is rated for 100000). I took a quick look at the OpenScale code and it looks like it will only write to flash when you change a configuration setting, so that shouldn't be too much of a concern. By the time you have changed settings 10000 times, you'll probably not mind too much having to replace your Due.

Do i need a bootloader for the ARM/Due
This has nothing to do with the bootloader so don't worry about that.

Go Up