Trying my first temperature sketch
-
So, I'm having some problems with trying my first sketch. I have no communication attached. Only a Arduino Nano with a temperature sensor. And I thought I should just see some values in the debug window.
But I can't get it to work.
First I tried using codebender and the example at https://www.mysensors.org/build/temp, after having to comment out some things in the sketch according to the comments I get this error:In file included from (library file) MySensor/MyGateway.cpp:12:
(library file) MySensor/MyGateway.h:39:28: error: use of undeclared identifier 'DEFAULT_CE_PIN'MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
I do understand that it is undeclared, but have no clue what value it should have. Thought that the example sketches should be finished and ready to use?
Anyway, also tried to copy the sketch to the Arduino IDE. And there I get another error:
..\Documents\Arduino\libraries\MySensors/MySensors.h:287:4: error: #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
#error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
Yes I know I don't have a gateway or anything, but then again. Shouldn't it be possible to run a sketch and look at the debug output?
As I said, this is my first time and I have probably done something wrong and this is easy to fix for someone who knows how all this works
-
I found the link to the updated 2.0 sketch and even though I still have problems, this is not one of them anymore
https://github.com/mysensors/MySensorsArduinoExamples
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
Echo request is not set
Troubleshooting • 12 Aug 2024, 15:36 • kamilb85 3 Sept 2024, 08:58 -
JSN SR04T - Temperature Influencing Readings
Troubleshooting • 6 Sept 2019, 07:51 • Timbergetter 25 days ago -
Compiling Sensor code using BME280 and ESP8266
Troubleshooting • 26 Feb 2025, 00:32 • dpcons 26 Feb 2025, 06:22 -
NODs stop responding, but ping works.
Troubleshooting • 8 Mar 2025, 19:47 • Marcin 8 Mar 2025, 19:47 -
DHT22 wrong sensor type in Home Assistant
Troubleshooting • 12 days ago • Commodoreuno 7 days ago