Errors compiling Photoduino 1.1 firmware for shield 3.0

Hi All,

I am completely blank with Arduino. I bought and built the photoduino shield kit for my photography hobby. I downloaded Arduino 1.6 and Photoduino 1.1 and followed the instructions on photoduino.com , but keep getting errors. I am able to narrow it down to some constant declarations in an included file, but I can not find a simpler error. Apparently there is some over-all error I can not find.

The main file states (among others):

048 #define LANGUAGE_FILE "language_EN.h"
.
.
.
325 #include LANGUAGE_FILE     // Messages

The include file:

/*
 * This file is part of Photoduino.
 *
 * Photoduino is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Photoduino is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Photoduino.  If not, see <http://www.gnu.org/licenses/>.
 */
 // Messages list                                                 "123456789012345"
const prog_char PROGMEM MSG_LANGUAGE_CODE[] =                     "EN";
const prog_char PROGMEM MSG_PHOTODUINO_V[] =                      "Photoduino v";
const prog_char PROGMEM MSG_READY[] =                             "Ready!";
const prog_char PROGMEM MSG_MAIN_MENU[] =                         "Main Menu";
const prog_char PROGMEM MSG_SYSTEM_CONFIG[] =                     "System Config";
const prog_char PROGMEM MSG_INTERVALOMETER[] =                    "Intervalometer";
const prog_char PROGMEM MSG_SENSOR_TRIGGER[] =                    "Sensor Trigger";
const prog_char PROGMEM MSG_CONFIG[] =                            "Config";
.
.
.

The compile error:

Using library LiquidCrystal in folder: C:\PeterPrograms\Fotografie\arduino-1.6.0\libraries\LiquidCrystal 
Using library EEPROM in folder: C:\PeterPrograms\Fotografie\arduino-1.6.0\hardware\arduino\avr\libraries\EEPROM 

C:\PeterPrograms\Fotografie\arduino-1.6.0/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10600 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\PeterPrograms\Fotografie\arduino-1.6.0\hardware\arduino\avr\cores\arduino -IC:\PeterPrograms\Fotografie\arduino-1.6.0\hardware\arduino\avr\variants\standard -IC:\PeterPrograms\Fotografie\arduino-1.6.0\libraries\LiquidCrystal\src -IC:\PeterPrograms\Fotografie\arduino-1.6.0\hardware\arduino\avr\libraries\EEPROM C:\Users\phofman\AppData\Local\Temp\build8507287310600590104.tmp\Photoduino.cpp -o C:\Users\phofman\AppData\Local\Temp\build8507287310600590104.tmp\Photoduino.cpp.o 
In file included from Photoduino.ino:325:0:
C:\Users\phofman\AppData\Local\Temp\build8507287310600590104.tmp\language_EN.h:18:7: error: 'prog_char' does not name a type
 const prog_char PROGMEM MSG_LANGUAGE_CODE[] =                     "EN";
       ^
C:\Users\phofman\AppData\Local\Temp\build8507287310600590104.tmp\language_EN.h:19:7: error: 'prog_char' does not name a type
 const prog_char PROGMEM MSG_PHOTODUINO_V[] =                      "Photoduino v";
       ^
C:\Users\phofman\AppData\Local\Temp\build8507287310600590104.tmp\language_EN.h:20:7: error: 'prog_char' does not name a type
 const prog_char PROGMEM MSG_READY[] =                             "Ready!";
       ^
C:\Users\phofman\AppData\Local\Temp\build8507287310600590104.tmp\language_EN.h:21:7: error: 'prog_char' does not name a type
 const prog_char PROGMEM MSG_MAIN_MENU[] =                         "Main Menu";
.
.
.

Please advice.

Thanx, Peter

Hello,

As you, I just started to install the dev environment and got plenty of errors.
I finally found the solution reading a spanish topic:
http://www.canonistas.com/foros/bricolaje/163054-photoduino-plataforma-abierta-de-control-de-disparo-172.html

You must add the following line in the main file (Photoduino):
#define prog_char char PROGMEM

Jean-Michel
France

salut
on peux me dire comment je dois faire pour bien installer le firmware
svp merci ça fais 3 jour que je cherche
photoduino shield 3 firmware 1.1 :’( :’( :’( :’( :’( :’( :’( :’(

C:\Users\topso\Desktop\Photoduino\controller_manager.ino:440:83: warning: ‘progmem’ attribute ignored [-Wattributes]

void controller_setUnits(byte variable, const prog_char msg){

^

C:\Users\topso\Desktop\Photoduino\controller_manager.ino:524:104: warning: ‘progmem’ attribute ignored [-Wattributes]

void controller_setNumericParameterValue(unsigned int value, const prog_char msg, byte units){

^

C:\Users\topso\Desktop\Photoduino\controller_manager.ino:592:75: warning: ‘progmem’ attribute ignored [-Wattributes]

boolean controller_confirmAction(const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:192:68: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printMessage(const prog_char* str) {

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:202:66: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printTitle(const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:210:69: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printQuestion(const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:218:82: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printEnumeration(byte num, const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\controller_manager.ino:440:59: warning: ‘progmem’ attribute ignored [-Wattributes]

void controller_setUnits(byte variable, const prog_char msg){

^

C:\Users\topso\Desktop\Photoduino\controller_manager.ino:524:80: warning: ‘progmem’ attribute ignored [-Wattributes]

void controller_setNumericParameterValue(unsigned int value, const prog_char msg, byte units){

^

C:\Users\topso\Desktop\Photoduino\controller_manager.ino:592:51: warning: ‘progmem’ attribute ignored [-Wattributes]

boolean controller_confirmAction(const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:192:44: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printMessage(const prog_char* str) {

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:202:42: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printTitle(const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:210:45: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printQuestion(const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\devices_manager.ino:218:58: warning: ‘progmem’ attribute ignored [-Wattributes]

void display_printEnumeration(byte num, const prog_char* str){

^

C:\Users\topso\Desktop\Photoduino\remote_manager.ino: In function ‘void remote_sensor_broadcast()’:

C:\Users\topso\Desktop\Photoduino\remote_manager.ino:217:53: warning: narrowing conversion of ‘(sensorValue / 256u)’ from ‘unsigned int’ to ‘byte {aka unsigned char}’ inside { } [-Wnarrowing]

byte responseValues[4] = {sensorType, sensorValue/256, sensorValue % 256, sensorOverflow};

^

C:\Users\topso\Desktop\Photoduino\remote_manager.ino:217:71: warning: narrowing conversion of ‘(sensorValue & 255u)’ from ‘unsigned int’ to ‘byte {aka unsigned char}’ inside { } [-Wnarrowing]

byte responseValues[4] = {sensorType, sensorValue/256, sensorValue % 256, sensorOverflow};

Probably the easiest way to solve this one would be to get the old version of the IDE (probably 1.0.6 would work) that the code was written for. The errors about prog_char are related to changes made to the compiler and/or IDE since then.

If you plan to do any other coding with this or try to modify this code then you can work on bringing it up to compliance with the latest version.

Now he writes in his 1.0.6

In file included from Photoduino.ino:325:
/Users/anais/Downloads/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h:212: error: multiple types in one declaration
/Users/anais/Downloads/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h:212: error: declaration does not declare anything

That's pointing to an error in a core library. That shouldn't be. You might try downloading it again and reinstalling. I've used that include before and didn't see any error. Something is amiss.

Or perhaps a better option would be to contact the author of the code and ask what version of Arduino it is compatible with and get that one.

I did everything on Mac and PC not always the same error

Utilizando IDE Arduino 156r2 sin instalación, compila y carga perfectamente.
Saludos JM.

Find/Replace

prog_char

with

char PROGMEM

prog_char used to be a supported way of putting things in PROGMEM, but it is not supported by current compiler version (ie, it wasn't the Arduino people's decision)