Looking for easier to program node

With the help of the documentation I got a node working using LMIC-node in a v3 application (ABP, OTAA did not work).
Is there anybody who can post an example of a more useful node, like a temperature node or a gps tracker for ttnmapper to start with?
I am not a programmer and mostly I use a lot off copy-paste and a little bit of own programming. (And, I think there are more people like me).

Accessing crystal ball ....

Crystal ball scanning for example more useful nodes ...

Crystal ball failure to establish base line ...

Sorry, what you are asking is impossible, as we don’t know what you made with LMIC-node, so the forum crystal ball has nothing to compare against. :wink:

How do you get petrol in to your car?

I did not make myself clear enough, probably because english is not mij native language and for me it is difficult to express myself in that language.
Where I was asking for is this: suppose someone has build a node with as BME280 temperature/humidity sensor around the LMIC-node. Perhaps I can use (a part of) his code between the lines “USER CODE BEGIN” and “USER CODE END” for one of my own test projects. Now I do not know where to begin.
I am just starting with lora and thethingsnetwork.

Roel

You still haven’t told us what you have made the device out of, just what the sensor is. So it may be that you have a perfectly good node to work with.

Do you want one you don’t have to program?

After I bought and installed a Mikrotek 8 channel gateway I made a couple of lora devices on a TTGO Esp32 Paxcounter v2.11.6 board. I used the arduino ide and the examples I found on the internet and in de libraries.
One of them was a gps tracker device to measure the range of my gateway in ttnmapper. Another device I build was a BME280 sensor.
Now I want to be able to program devices like that gps tracker with the lmic-node code but I do not kwow where to start.

(I am a 71 years old hobbyist without any programming background but willing to learn)

FYI, the real name and version of that board is TTGO LoRa32 V2.1.6.
“TTGO Esp32 Paxcounter v2.1 1.6” is just some fancy marketing name to make it look more special (and it comes default loaded with the Paxcounter firmware).

You can find more information about these and other ESP32 LoRa boards in the Big ESP32 + SX127x topic part 3 topic.

LMIC-node was just recently released so you may not be able to find an extended version of it yet with exactly the pieces added that you are looking for.

The strength of LMIC-node is that it is a cross-platform LoRaWAN example that works with many boards. Adding specific sensors would break the generic character and will only work for those sensors.

It will probably be easier to learn from other, simpler (non-LoRaWAN) example programs and then copy the logic for reading those sensors (e.g. BME280) and extend LMIC-node with that functionality.
But you should be prepared for several learning curves (e.g. programming, Arduino, reading sensors, writing output, LoRaWAN).

I noticed a fork of LMIC-node called WeatherStn-2021. Maybe it can help you in the right direction (I haven’t checked it and am not aware which sensor(s) it supports).

You are right. Perhaps better to wait a couple of months before trying to use this node.

For that purpose there are special locations in the code between the lines “USER CODE BEGIN” and “USER CODE END”. I hoped someone has used de LMIC-node for more than the builtin counter.

Writing simpler example programs (non-LoRaWan and LoRaWan) in the Arduino IDE and PlatformIO is exactly what I did. At the moment I understand the logic of most of the code and use it for my own purpose (home automation, garden irrigation).

This makes no sense at all - pretty much all the sensor code for all the sensors for Arduino can be implemented.

Just find a decent implementation which usually comes with the examples for the library for the sensor and copy over the relevant bits. Then put the readings in to the payload.

It’s not clear if you’ve built the BME280 hardware and now need to program it or if you’ve got that programmed as well. If not, how do you know if the hardware is OK? The way to find out would be to run a BME280 example that sends readings to the serial log. Once you’ve got that code working, you’d then marry up the two sets of code.

I thought it was obvious that my nodes worked :wink: I even managed to get de BME280 readings into my home automation system via node-red and used the gps tracker node to measure the range of my first experimental one channel esp32 gateway.

I am retired with some spare time, so I will use that time trying to combine the code of the examples into de code of the lmic-node.

Thanks for your answers.

Possibly, it may well be that as a moderator I try to read all posts for moderation and also contribute some actual answers. Because your first post appeared to be that you’d got an ABP connection going but not got a sensor working and we didn’t know what the device was, it just got a little confusing.

The tricky bit for most people is getting the sensor data in the payload, this is useful information which you may already know.

https://www.thethingsnetwork.org/docs/devices/bytes/

But fundamentally, you’ve come to the table with something that works, which is more than most do! It will feel less of a struggle as you do more.

The other trick is to have several projects, one for each sensor, so you can see the wood from the trees when you are debugging.

So what’s holding you from adding some of your own code to LMIC-node?

Well… nothing. I did some coding and ended with a temperature reading from a DHT11 sensor in the payload.

Thanks you both for your help.

1 Like

Hi
I think this node is marvellously bilt, but to rule them all, some one has to provide a simple example like you said at the beginning. Where do you place your defines, create instances of your sensors, void setup() and then where to integrate the loop with the reedings and the coding for the payload.

I too think that an example of a simple sensor could open the field to a new large group of makers. The ones that build on previous good work but are lazy to go deep (that’s me…)

By the you, roelwolf could provide the code you already built and be the one who starts the new generation of users of the node.

That would be great

Pedro

built

That’s exactly what LMIC-node already is and provides.

Just read the LMIC-node documentation and the guidance provided in the source code.

LMIC-node is about as gift-wrapped as it is going to get without paying someone to write the sensor code - and I speak as someone that uses it, LMIC raw, LoRaMAC-node (the reference code) and Microchip LoRaWAN Stack.

And use the edit button - click on the … to see more functions!

1 Like

Ditto - I can relate.

In the mean time I learned a lot.
See https://github.com/roelwolf/LMIC-node-T-Beam-GPS for an example of a gps node build on the LMIC-node.

I am almost there (only need to byte encode the sensor readings I can serial print). Thanks roelwolf.
I also did learn a lot myself and… yes… better not having everything gift wrapped- thanks descartes.