DIY Jeti-sensors – New library

I’ve been in contact with Radek who is the author of the Jeti-library in most of my DIY-sensors. (His Github is here). We’ve had some talks about datatypes and so on during the spring & summer and he also had in mind to do some re-writing of the library. Now the results are in and I made some test’s.

What’s new?

There is no new functions per se but existing stuff have been improved, some significantly:

  • Better memory-management (Up to 20% reduction)
  • Support for Jeti datatypes 6, 14, 30 and GPS-Data (30 is new)
  • Support for ATmega328(P), ATmega32u4 and ATTiny85
  • New software serial for Jeti-communication
  • Addiditional support for PROGMEM strings
  • Sending buffer removed
  • Fixed timing removed

In English please?

If we try to break these in to layman terms here’s a few of them:

  • Better memory management simply means we have more room for the sensors-operation. For example there is more room to do combination sensors with example like AltMeter, G-sensor in the same unit etc
  • New datatypes makes my previously needed dirty hack obsolete, old library supported only values up to 8192 by default, now it supports up to 536870911
  • New processor support is interesting, ATTiny85 is really small. And ATmega32u4 is really powerful
  • Biggest improvement is on the Jeti-communication, new software-serial is significantly faster than the old one. Also the sluggish Jetibox Up-button behaves way more better. Navigation in Jetibox overall is also much improved
  • New software-serial to Jeti also makes the actual sensor-building easier, no more 2.4k resistor needed

New sensor firmware

I have tested new library on G-Force sensor (here). So if you write your own sensors have a look, if you like it then use it, if you hate then don’t :)

What is most important is that user-experience with this new library truly is significantly improved. And in my mind that is very valuable.

New code management

With the new library I also moved from single-file firmware management to multi-file. This means that instead of one big file I have split different things to their own files for easier code-management and new sensor development.

Here’s a breakdown of the files:

  • RCT-SensorX.ino – The sketch file, no need to edit anymore
  • Jeti_Functions.h – For any functions to be called for example in loop()
  • Jeti_Includes.h – For including any libraries needed
  • Jeti_Init.h – For initialization like defining values, also some Jetibox settings
  • Jeti_JB_Navi.h – Jetibox navigation and button actions
  • Jeti_JB_Screens.h – Jetibox screens are built here
  • Jeti_Runtime.h – The working loop() for the sensor, this is where the magic happens
  • Jeti_Setup.h – This is where the sensor-values sent to Jeti is defined. Also the place for any setup-related actions.Sensors name is defined here (For example the RCT seen in telemetry-window like “RCT: Temperature”)

You can have a look on the G-Force sensors Github here. No new functions on the firmware have been added or changed, if you have built the G-Sensor no need to update for v.1.2.

While it might be confusing at first all this makes it a lot easier for me to make new sensors and search for any issues while writing or changing something.

Like said before, some like it this way, some don’t, I do :)

But hey!

It’s summer, get out and fly/drive/sail something RC-related!

Leave a Reply

Your email address will not be published.