Hi. New to this forum (first post) and newish to to the world of Arduinos.
I'm building a fridge temperature controller/data logger currently based on a Nano. My initial plan was to log data to an SD card but it would be much neater if I could log data, and ideally set controller parameters, remotely from my (Linux) PC or from a Pi over my WLAN. I'm not (yet) concerned with remote access from outside my home.
Because I'm OK with *nix my immediate thought is to do this with a UDP of TCP connection.
I've spent ages researching various possibilities but my searches are becoming increasingly divergent. There is a lot of stuff out there, but many paths lead to dead ends - obsolete hardware and/or unsupported legacy software.
To my question at last - can anyone recommend current hardware with a library supported in the Arduino IDE which would do what I want?
Robin.
Take a look at the tiny new RPi's like the Pi Zero W. I think you could get going much faster with one of those, rather than wade through the myriad of wireless Arduino options, with their half-baked code examples, poorly documented APIs, etc.
Welcome!
Welcome to the world of many konfused engineers etc. I did something similar and used a ESP8266 and a RTC (Real Time Clock) module where I replaced the EEPROM with FRAM ( Ferroelectric RAM) which is a non-volatile memory technology. That gave me 32K words and no delay in writing. The data could be accessed with my browser on my Linux machines with google or firefox using the duckduckgo browser or chrome. Also with the phones and Ipad. The part is SMD (Surface Mounted Device) and the swap takes some finesse as the packages are not the same. They also sell modules that have a 8 pin EEPROM in which the FRAM is pin compatible so that would work if you do not want to solder. You could download whenever you wanted and only erase when the data gets old.
Thanks for replies.
jremington - I thought about RPi options early on but decided on Arduino partly because because of the 'conventional wisdom' that RPi's are good for compute intensive stuff, microcontrollers better for reading sensors &c, and partly because there are so many module-specific libraries for the Arduino IDE available. Also RPi libraries where available seem to be written in Python which I don't speak, but I'm proficient in C/C++. And I'm an old dog! It would make networking a whole lot easier though, and I'm revisiting - it seems that there is a rpgpio library written in C out there.
gilshultz - thank you for your welcome. I had a look at the ESP8266 and have ordered an ESP32 board, which seems to be the successor to the 8266. For £7 it's worth a go! If you can give any further info on how you got your 8266 to talk to your Linux machines that would be great. On FRAM - a bit beyond me at the moment, but I had a look and and have squirreled away for future reference.
Robin.
Evidently you haven't looked at the latest small board MCU offerings, like the Pi Zero W, which unlike the somewhat cheaper ESP32, runs an extremely mature, thoroughly debugged and well documented OS.
I use mine as headless systems, and log in using SSH or Remote Desktop over the home network. No accessories needed except for a power supply!
Sorry if I was unclear - I have looked and realise that eg the Pi Zero runs a reliable Unix-type OS. I was thinking of this sort of thing (quoted from a random search):
"There are numerous factors to weigh in when choosing an MCU.
You’ll want to consider the complexity of the application. If a design involves a simple timer activated output, a simple microcontroller with 1kB flash and a single port of I/O will suffice. However, if the design involves complicated logic such as a WIFI-based facial recognition device, you’ll need a 32-bit high-end MCU. "
So maybe more about production costs than anything. But there is still a trade-off for me between ease of programming the networking bit (can do that, I too run a headless RPi ) and ease of programming the data acquisition bit - which seems more straightforward with an Arduino.
Maybe I'm wrong, I'm trying to learn this stuff!
Robin
I completely agree with the quote.
Since you intend to log data to an SD card, it is worth keeping in mind that the Arduino implementation of the SD library is a several orders of magnitude less reliable than the linux implementation on RPi micros. The difference is like night and day.
I gave up on Arduino SD long ago for anything that requires more than a few minutes or hours of data collection, and even then I don't bank on success. A look through this forum will reveal a long series of complaints.
The ESP32 implementation might be better, but I haven't bothered to test it.
OK, thanks, that's valuable information. I got the SD working with a nano but it was a bit flaky - I put that down to my inexperience. Maybe not.
You are beginning to persuade me that I might be better off going down the RPi route - the cost difference isn't relevant for what I want to do and maybe it would be less frustrating in the long run.
Cheers, Robin
I got the SD working with a nano but it was a bit flaky
Hardly a surprise! Something goes wrong nearly every time I try to use it. Adafruit's implementations of the same code base with flash memory don't seem to be much more reliable, so it is not the card or socket.
There are various theories as to the root(s) of the problem (not interrupt safe, for one), but to my knowledge, no one has been able to pin down and fix them.
how you got your 8266 to talk to your Linux
I used the wifi module in the library, it worked first time. As far as programing it is a WeMos R1D1 on a UNO format board. I just plugged it in, selected the processor from WeMos in the IDE and away it went.
[...]
I used the wifi module in the library, it worked first time. As far as programing it is a WeMos R1D1 on a UNO format board. I just plugged it in, selected the processor from WeMos in the IDE and away it went.
Thanks. This is useful info. I want to use TCP/IP and when I had a look at the Arduino WiFi Library Reference it said the library was 'retired' so I wasn't confident. I now have an ESP32 and will give it a go with the Arduino library. Maybe it'll just work.
More generally, I have discovered that Espressif have their own IDE (or IDF as they call it) for programming ESP32's. I've had a look at their documentation and (for me at least) it seems more transparent than the Arduino way of doing things. I'll be trying to get to grips with that.
Thanks again, Robin.
it said the library was 'retired' s
Me to but I keep on working. That is why when I do a project i place all of the libraries in the sketch folder. That burns some disk space but not much. Nice part several years down the road it will still compile. I also keep a copy of each version of the IDE I use.
Just to draw a line under this, for now at least. I ended up buying a couple of RPi picos - one WiFi and one plain. I don't like to criticize the Arduino effort, especially not on an Arduino forum, but the RPi documentation is better for me. Perhaps that's because I come from a science/tech background so I'm happy with the Unix way of doing things from the terminal rather than through an IDE. Either way, It's great that this stuff is becoming more accessible.
Thanks again for your useful comments.
I don't like to criticize the Arduino effort
Arduino LLC has come into a lot of criticism lately, with much expressed on this forum, so don't worry.