Questions tagged [flash]

Flash memory is a type of memory available on the Arduino boards. It can be accessed from a program using PROGMEM directive to store data. For questions about using and accessing flash memory, use this tag.

Filter by
Sorted by
Tagged with
5
votes
2answers
10k views

Using PROGMEM to store array of structs

I am hitting the limits of my arduino's SRAM and found that SRAM usage can be reduced by storing static stuff in flash memory instead of SRAM. My project can (optionally) be built with an included ...
4
votes
3answers
6k views

How to read/write variables persistenly on Arduino Due (no EEPROM/shield)?

I am relatively new to Arduino and I am currently writing some code to control a relay board. The on/off times are provided by the user at run-time and should be stored persistently (EEPROM or flash) ...
1
vote
1answer
2k views

Flash a .hex to an ATtiny45 with Arduino

I'm trying to upload a hex file to an ATtiny45 with an Arduino. I uploaded the Arduino ISP sketch to my board. I connected the ATtiny as shown below: Then I go to CMD and type: avrdude -c avrisp -p ...
5
votes
2answers
2k views

Store floats in and reading them from flash

How do I store floats in flash and how do I read them from there? (I need a look-up table for pairs of float values.) The storing part doesn't seem to be so difficult as this compiles: PROGMEM float ...
2
votes
1answer
692 views

What protocols and tools does Arduino Due use for flashing and debugging?

I am interested in writing a simple C program outside of the Arduino IDE and respective libraries, but deploying it directly to an Arduino Due (which uses a SAM3X8E ARM MCU). I am trying to figure out ...
2
votes
2answers
473 views

How do I implement a userspace bootloader on Arduino Due?

Is it possible to use a custom bootloader, that loads and executes a main program stored for example on an SD card? The idea is to make it possible to update the Arduino remotely. I tried this with a ...
0
votes
2answers
178 views

Storing data (strings) if ethernet fails to send it

Flow goes something like: Read sensors Send data If send fails store the data in eeprom/flash/sd If sent check if any previous ones have failed and send those So my question is what's the best ...
1
vote
1answer
932 views

Unable to upload sketch after bootloader has been flashed on Arduino Micro

I have created my own custom Arduino Micro, but I am experiencing problems when I attempt to upload an sketch via USB in Arduino IDE. Here is how I program the Arduino Micro: avrdude -c ...
0
votes
2answers
2k views

Cheap 2-5mb memory to use with arduino

I'm looking for a storage solution for small files that would be moved into a small sensor running arduino-like processor. Ideally the single memory unit would be cheap (in 1-10 cents range), but the ...
8
votes
3answers
10k views

PROGMEM: do I have to copy data from flash to RAM for reading?

I have got some difficulties understanding the memory management. Arduino documentation says, it is possible to keep constants like strings or whatever I don't want to change during runtime in ...
1
vote
1answer
780 views

What is the capability of AVRISP and USBASP on ATMega48, 328, 2560?

For use with ATMega 48 (old Arduino?), 328 (UNO, Pro Mini) and 2560 (Mega2560) chips, what is the capability for the AVRISP and USBASP programmers on: Can it read, write fuse? Can it read, write ...
8
votes
2answers
6k views

Is it possible to run a binary from EEPROM?

Say I wrote a compiled sketch to EEPROM then read it. Could I run the program from EEPROM? I guess the question is: Can an Arduino run software not in flash memory in the middle of executing the ...
0
votes
1answer
206 views

question about progmem

I have a problem understanding the following code: PROGMEM prog_uint16_t x={1232,3232,43343}; rawlen = pgm_read_word_near(x); memcpy_P(uSendBuff, pfSendBuff+1, rawlen * sizeof(uint16_t)); Why do we ...
2
votes
3answers
3k views

Wrong data from DS18B20 temperature sensor after long power off

I have my Arduino Uno connected to the PC via USB when prototyping. I am developing a thermometer with memory, using DS18B20 sensors. When PC is shut down, there is no power on the USB and the ...
1
vote
1answer
306 views

Error building Arduino WiShield Flash example: 'dflash' was not declared in this scope

I'm using WiShield library from: https://github.com/jcmuller/WiShield What is wrong with this library? The code: /* * Web Server using Flash * * A simple web server example using the WiShield 2....
7
votes
4answers
5k views

Where can I find out how to make a hex file for arduino firmware?

I have followed this tutorial on flashing my Arduino R3 to turn it into a "USB keyboard", but the article doesn't explain how the hex works, it's just for granted. Where can I learn about how to make ...
5
votes
2answers
1k views

What are the FLASH_ARRAY/FLASH_TABLE macros in this code?

In this code for heating monitor, there appears to be macros called FLASH_ARRAY and FLASH_TABLE. I can't find any reference to them either in this code, Arduino, or on the Internet. What do they do? ...
15
votes
6answers
67k views

How do I erase the memory of the Arduino Uno?

I'm just a tinkerer learning Arduino with my son and I was surprised that when I plugged the USB cord back in to the Arduino the program was still running and I thought to myself, "it's a good thing I ...
30
votes
4answers
79k views

What can I do if I run out of Flash memory or SRAM?

According to the Arduino documentation, the ATmega328 has 32KB of Flash memory for the bootloader + uploaded sketch, and only 2KB SRAM for runtime data. The ATmega2560 has quite a bit more, totalling ...

1 2
3