Weather station Arduino-application does not work

Moderators: mdrjr, odroid

Weather station Arduino-application does not work

Unread postby deecee » Wed Sep 05, 2018 7:35 pm

I made a weather-station.fw (firmware) file using 'mkfw' as described here:
https://wiki.odroid.com/odroid_go/arduino_app

However, if I select the application in the firmware menu it does not start correctly. The LCD screen just flashes approx. every two seconds. Other applications like Flappy Bird run correctly. Also, if I upload the weather station application using the Arduino IDE everything is fine (however, I need to flash the firmware again if I want to play again - that's why I found the 'mkfw'-tool compelling).

Any solution is highly appreciated.
deecee
 
Posts: 15
Joined: Fri Aug 17, 2018 7:17 pm
languages_spoken: english
ODROIDs: Odroid go

Re: Weather station Arduino-application does not work

Unread postby lsc1117 » Thu Sep 06, 2018 5:12 pm

Do Other Arduino examples work fine?
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Weather station Arduino-application does not work

Unread postby lsc1117 » Thu Sep 06, 2018 5:24 pm

I know why the weather-station example does not work.
The binary did not include the data folder about web source.

I will try making a binary including data folder.
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Weather station Arduino-application does not work

Unread postby deecee » Thu Sep 06, 2018 9:22 pm

Oh yes, you're right. I forgot about that. A solution including the web server would be great.

Another solution would be to remove the web server stuff from the code because I don't need it. I am interested in longterm recordings that saves the weather station data e.g. every five minutes on the sd card. However, I didn't find time yet to implement this.
deecee
 
Posts: 15
Joined: Fri Aug 17, 2018 7:17 pm
languages_spoken: english
ODROIDs: Odroid go

[solved] Weather station Arduino-application does not work

Unread postby deecee » Sat Sep 08, 2018 7:48 am

Finally, I found a solution after some instances of try and error (I am new to Arduino). I removed the web server stuff from the code and, hence, the 'ESP32 Sketch Data upload' isn't necessary anymore.

Thank you lsc1117 for pointing me to the error.
deecee
 
Posts: 15
Joined: Fri Aug 17, 2018 7:17 pm
languages_spoken: english
ODROIDs: Odroid go

Re: Weather station Arduino-application does not work

Unread postby crashoverride » Sat Sep 08, 2018 8:59 am

Just a note that "mkfw" supports multiple partitions and there is no requirement to remove the data (SPIFFS) partition.
crashoverride
 
Posts: 4023
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Weather station Arduino-application does not work

Unread postby deecee » Mon Sep 10, 2018 4:01 am

Thank you for your information. However, I am still an Arduino/ESP32 newbie and, hence, I would need more information on partitions and so on.
deecee
 
Posts: 15
Joined: Fri Aug 17, 2018 7:17 pm
languages_spoken: english
ODROIDs: Odroid go

Re: Weather station Arduino-application does not work

Unread postby lsc1117 » Mon Sep 10, 2018 12:20 pm

First, we need to use the "mkspiffs" tool to make the data folder binary.
https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/storage/spiffs.html#spiffs-filesystem
And then, you need to make one binary using the "mkfw".

We will add the usage to the wiki.
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Weather station Arduino-application does not work

Unread postby lsc1117 » Mon Sep 10, 2018 2:21 pm

@CrashOverride,

I have a question.
Where is the spiffs partition on ODROID-GO(device firmware)? As far as I know, the spiffs partition in Arduino is at address 0x3f1000(0x3f1000) or 0x291000(default).

https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/default.csv
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Weather station Arduino-application does not work

Unread postby crashoverride » Mon Sep 10, 2018 2:56 pm

lsc1117 wrote:Where is the spiffs partition on ODROID-GO(device firmware)?

There are no fixed offsets used by the device firmware.

The Arduino SPIFFS partition linked above is as follows:
Code: Select all
# Name,   Type, SubType, Offset,  Size, Flags
spiffs,   data, spiffs,  0x291000,0x16F000,


The "Name", "Type", and "SubType" identify the partition. Converting them to "mkfw" as follows:
Code: Select all
#type subtype length label binary
1 130 1503232 "spiffs" partition_data.bin


The SPIFFS partition information is derived from here:
https://github.com/espressif/esp-idf/blob/master/components/spi_flash/include/esp_partition.h
Code: Select all
ESP_PARTITION_TYPE_DATA = 0x01, //!< Data partition type
[...]
ESP_PARTITION_SUBTYPE_DATA_SPIFFS = 0x82, //!< SPIFFS partition
crashoverride
 
Posts: 4023
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Weather station Arduino-application does not work

Unread postby amstradcpc » Mon Sep 10, 2018 9:27 pm

I have 2 problems with weather station (windows OS) :

1) when using Tools / ESP32 Sketch Data Upload : SPIFFS Error : mkspiffs not found!, I downloaded mkspiffs.exe from https://github.com/igrr/mkspiffs/releases, unzipped it in Arduino/tools/mkspiffs, still the same error

2) when using Sketch / Verify/compile, I have an error messageI : "Arduino/hardware/espressif/esp32/tools/esptool/esptool.exe": file does not exist. I have esptool.py in Arduino\hardware\espressif\esp32\tools but no esptools folder nor .EXE, does GET.EXE download more that 1 file ? Because I had to download manually xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip due to proxy.
amstradcpc
 
Posts: 3
Joined: Mon Sep 10, 2018 7:54 pm
languages_spoken: english
ODROIDs: Odroid-GO

Re: Weather station Arduino-application does not work

Unread postby lsc1117 » Mon Sep 10, 2018 11:08 pm

crashoverride wrote:
lsc1117 wrote:Where is the spiffs partition on ODROID-GO(device firmware)?

There are no fixed offsets used by the device firmware.

The Arduino SPIFFS partition linked above is as follows:
Code: Select all
# Name,   Type, SubType, Offset,  Size, Flags
spiffs,   data, spiffs,  0x291000,0x16F000,


The "Name", "Type", and "SubType" identify the partition. Converting them to "mkfw" as follows:
Code: Select all
#type subtype length label binary
1 130 1503232 "spiffs" partition_data.bin


The SPIFFS partition information is derived from here:
https://github.com/espressif/esp-idf/blob/master/components/spi_flash/include/esp_partition.h
Code: Select all
ESP_PARTITION_TYPE_DATA = 0x01, //!< Data partition type
[...]
ESP_PARTITION_SUBTYPE_DATA_SPIFFS = 0x82, //!< SPIFFS partition


Thank you. I will try it.
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Weather station Arduino-application does not work

Unread postby lsc1117 » Mon Sep 10, 2018 11:14 pm

amstradcpc wrote:I have 2 problems with weather station (windows OS) :

1) when using Tools / ESP32 Sketch Data Upload : SPIFFS Error : mkspiffs not found!, I downloaded mkspiffs.exe from https://github.com/igrr/mkspiffs/releases, unzipped it in Arduino/tools/mkspiffs, still the same error

2) when using Sketch / Verify/compile, I have an error messageI : "Arduino/hardware/espressif/esp32/tools/esptool/esptool.exe": file does not exist. I have esptool.py in Arduino\hardware\espressif\esp32\tools but no esptools folder nor .EXE, does GET.EXE download more that 1 file ? Because I had to download manually xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip due to proxy.


It is obvious that the installation of Arduino is wrong.
Could you try this again?
https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/windows.md
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Weather station Arduino-application does not work

Unread postby lsc1117 » Tue Sep 11, 2018 11:20 am

I have added a way to include data folder in ".fw" at the wiki.
https://wiki.odroid.com/odroid_go/arduino_app#including_a_data_folder_into_the_fw
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Weather station Arduino-application does not work

Unread postby deecee » Tue Sep 11, 2018 7:31 pm

Thank you for your information and the updated wiki. Very helpful.
deecee
 
Posts: 15
Joined: Fri Aug 17, 2018 7:17 pm
languages_spoken: english
ODROIDs: Odroid go

Re: Weather station Arduino-application does not work

Unread postby amstradcpc » Wed Sep 12, 2018 5:21 pm

lsc1117 wrote:
amstradcpc wrote:I have 2 problems with weather station (windows OS) :

2) when using Sketch / Verify/compile, I have an error messageI : "Arduino/hardware/espressif/esp32/tools/esptool/esptool.exe": file does not exist. I have esptool.py in Arduino\hardware\espressif\esp32\tools but no esptools folder nor .EXE, does GET.EXE download more that 1 file ? Because I had to download manually xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip due to proxy.


It is obvious that the installation of Arduino is wrong.
Could you try this again?
https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/windows.md


Nope, as stated above, the problem came indeed from get.exe and proxy.

At home, get was able to download all 3 files including mkspiffs and esptool.

Sadly it seems there is a calibration error, temperature was 5-7 celcius degrees higher and humidity 10-12% higher.
amstradcpc
 
Posts: 3
Joined: Mon Sep 10, 2018 7:54 pm
languages_spoken: english
ODROIDs: Odroid-GO


Return to Arduino Coding Camp

Who is online

Users browsing this forum: No registered users and 1 guest