Unless you really have a long term plan you want to follow (e.g. I want to be an expert in X), you can't go too wrong if you just try something different for your next project:
- Stick to the Arduino environment, and dig into the lower levels - you can even experiment with inline assember if you like
- Pick a sensor of protocol that nobody else uses and build an Arduino library for it. Add to the community.
- Get an H/W debugger, switch to AVR studio, and read the datasheets if you want to really power up your AVR skills and knowledge
- Go to the really minimal tiny MCUs if you like logic puzzles and learning assembler. I fondly remember the PIC16F84 days...
- Prototype on Arduino, then move your to custom PCBs if you like the smell of solder
- Go for something like a Ti TM4C123 LaunchPad dev board if you just want to try something different, but with a 'professional' edge to it (simulator, debugger, Keil)- you can even do the EdEx course from University of Texas if you feel the need:
https://www.edx.org/course/embedded-systems-shape-world-utaustinx-ut-6-10x- Go for an ESP32 in Arduino if you want Wifi and to feel like bashing your head against a wall due to the lack of examples
- Go for the Pi Zero and stick with I2C sensors if you are more interested in the application than the lower levels, and Python along the way
Plenty of options - each one you will learn something different, none of them a waste of time.
Which calls to mind my current tinkering project - a few WiFi modules for monitoring the temperature/humidity around the house.
- I could use a Arduino Library and an off the shelf Temp module and a WiFi shield, but that would cost big $$$, and can't be battery powered
- I could use a Raspberry Pi Zero, and an I2C sensor, but where is the fun in "reading "/dev/i2c/" from a web page,it would be cheaper then the Arduino project made using parts from the local hobby shop.
- I could use a bare AVR, design a PCB and reflow it, and put 433MHz RF modules on it, but really? who has the time to design, build and bring up a board for a one off weekend project.
- I chose to go with ESP32 - can use low power modes to save battery, has on board Wifi, can be battery powered (approx 150mA @ 5V when Wifi is active,way less than 1mA when sleeping). Total project cost about $7, including sensor.
It has been interesting so far. The DHT11 sensor's protocol works in a time scale that is tricky to work in, as it needs timing of 10us to 100us pulses (see image).
The ESP32 is still quite new, and a quick review showed that the first-hit GitHub library for the ESP32+DHT11 suck. For example:
/*-------------------------------------------------------------------------------
;
; get next state
;
; I don't like this logic. It needs some interrupt blocking / priority
; to ensure it runs in realtime.
;
;--------------------------------------------------------------------------------*/
int getSignalLevel( int usTimeOut, bool state )
{
int uSec = 0;
while( gpio_get_level(DHTgpio)==state ) {
if( uSec > usTimeOut )
return -1;
++uSec;
ets_delay_us(1); // uSec delay
}
return uSec;
}
Writing by somebody who is still thinking in a low end micro mindset, and is relatively clueless about how to do things when you grow into bigger, more complex environments where interrupts may be pinging off - but to their credit, at least they realize it!
It appears that the ESP32 has a 'RMT' peripheral that is perfect for this. Originally designed for using with IR remote controls it counts the length of high/low pulses and stores them in RAM, until it times out. I now have an interesting and somewhat useful < $10 weekend mostly software project where I might learn something that will be handy.