(2021-10-02, 06:10 PM)seandepagnier Wrote: I use minicom.. the configuration here is interactive.
Sean,
I used minicom too ; the result is the same : ignoring when typing config followed by return.
I tried to compile the last version of weathersensor.ino but run into troubles:
Code:
git clone https://github.com/pypilot/pypilot
cd ./pypilot/arduino/weathersensors
I edited the code to set LCD (the minimal weather sensor has no LCD)
Code:
#define LCD NONE
//#define LCD NOKIA5110L
//#define LCD JLX12864G
And then make (note: compilation on debian)
Code:
make
Code:
cp weathersensors.ino obj/weathersensors.ino.cpp
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/Wire -I/usr/share/arduino/libraries/Wire/utility -I/usr/share/arduino/libraries/SPI -I. -c obj/weathersensors.ino.cpp -o obj/weathersensors.o
obj/weathersensors.ino.cpp: In function ‘void setup()’:
obj/weathersensors.ino.cpp:266:13: warning: variable ‘div’ set but not used [-Wunused-but-set-variable]
uint8_t div = 1;
^
obj/weathersensors.ino.cpp: In function ‘void read_anemometer()’:
obj/weathersensors.ino.cpp:670:14: error: conflicting declaration ‘uint16_t count’
uint16_t count = rotation_count;
^
obj/weathersensors.ino.cpp:516:13: note: previous declaration as ‘int16_t count [3]’
int16_t count[3];
^
obj/weathersensors.ino.cpp:678:13: warning: the address of ‘count’ will always evaluate as ‘true’ [-Waddress]
if(count) {
^
obj/weathersensors.ino.cpp:680:54: error: invalid operands of types ‘double’ and ‘int16_t [3] {aka int [3]}’ to binary ‘operator*’
float newknots = .868976 * 2.25 * 1000 * count / period;
^
make: *** [Makefile:67: obj/weathersensors.o] Error 1
I look at the code and indeed coutn is declared two times as an int array and then as unsigned int. Not sure why.
Sean, if you have some guidance, I'll take it.
Best regards,
Xavier.
OK ; very bad hack : I have replaced count by count1 in lines 670, 678 and 680 and compiled via make with only warnings ; make upload worked as expected upolading to the arduino.
minicom has been used and I now have access to config.
Sean, could you comment on the count variable ?
Best regards,
Xavier.