# PROGMEM error

**URL:** <https://forum.arduino.cc/t/progmem-error/304327>\
**Category:** Programming\
**Created:** [April 12, 2015, 6:06pm UTC](https://forum.arduino.cc/t/progmem-error/304327 "2015-04-12T18:06:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 12, 2015, 6:06pm UTC](https://forum.arduino.cc/t/progmem-error/304327/1 "2015-04-12T18:06:22Z")

</div>

Hi all,

Im recreating the following project: [Tiny-altimeter](http://electro.olganet.com/2014/03/29/tiny-altimeter-oled/)  
Im using the exact same hardware as described.

But i get the following error on my Macbook pro and my windows 8 pc:

> /var/folders/r\_/gqglp97s6qz9qbfwxz5j5np00000gn/T/build413328842511002658.tmp/Battery.c:8:17: error: variable 'Battery' must be const in order to be put into read-only section by means of ' **attribute** ((progmem))'  
> PROGMEM uint8\_t Battery[] = {  
> ^  
> Error compiling.

Can someone please help me or point me in the right direction?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 12, 2015, 6:24pm UTC](https://forum.arduino.cc/t/progmem-error/304327/2 "2015-04-12T18:24:09Z")

</div>

never mind... i found the solution:

In front of all the lines in the errors just add 'const'.

New error:

altimetre\_oled\_bmp180\_04.ino: In function 'void setup()':  
altimetre\_oled\_bmp180\_04.ino:73:29: error: 'Splash' was not declared in this scope  
Error compiling.

Can someone help please?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 12, 2015, 6:30pm UTC](https://forum.arduino.cc/t/progmem-error/304327/3 "2015-04-12T18:30:24Z")

</div>

> Can someone help please?

Sure Post your code. Clearly, you are trying to use a variable, Splash, that is either not defined or is defined in some other scope.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 12, 2015, 6:36pm UTC](https://forum.arduino.cc/t/progmem-error/304327/4 "2015-04-12T18:36:16Z")

</div>

Spash != Splash

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 12, 2015, 6:38pm UTC](https://forum.arduino.cc/t/progmem-error/304327/5 "2015-04-12T18:38:25Z")

</div>

> AWOL:  
> Spash != Splash

Someone must have said "Get the 'ell out of 'ere", and been misunderstood.

---

<div class="post-metadata">

**Author:** ![jurs](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jurs](https://forum.arduino.cc/u/jurs)\
**Post date:** [April 12, 2015, 6:41pm UTC](https://forum.arduino.cc/t/progmem-error/304327/6 "2015-04-12T18:41:34Z")

</div>

> beukhof1:  
> But i get the following error on my Macbook pro and my windows 8 pc:  
> Can someone please help me or point me in the right direction?

If you want to compile ancient Arduino code on Windows that was developed for an older version of the Arduino IDE, it will always help to install the older version of the Arduino IDE and compile using that.

On Windows, all the tools and compiler versions are bound to the path where Arduino is installed, so if you installed an old IDE version, you also have an old GCC compiler, an old AVR LIBC library, old linker version and so on. So you just have to find out for which old IDE version the code is, then install this old version on Windows and compile.

This may fail with Linux/MAC versions, as in those systems a new GCC compiler or a new AVR LIBC may be active, even when using an old IDE.

The other solution would be: Learn programming and make the actual code of your sketch and all libraries compile with the actual Arduino IDE version you are using actually.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 9:13pm UTC](https://forum.arduino.cc/t/progmem-error/304327/7 "2021-05-05T21:13:58Z")

</div>

Closed on May 5, 2021, 9:13pm UTC


