This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Miniam Weather Sensor / baro & temperature calibration
#6
(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
Various outputs but ended with the following:
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.
Reply


Messages In This Thread
RE: Miniam Weather Sensor / baro & temperature calibration - by damien - 2021-10-02, 07:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)