The officially official Devuan Forum!

You are not logged in.

#1 2020-02-27 20:34:52

noname
Member
Registered: 2019-09-25
Posts: 16  

Arduino version currency?

So i have a new toy, an Elegoo Arduino starter kit.  Now, being the lazy individual i am, i just went to synaptic and installed the Arduino IDE shown there.  However, i'm concerned with whether the version in the library is current.  The Elegoo docs are all like, "you'll get a crappy old version", so what's the real deal?  Do i need to go through the manual install process, or is our version current?

Offline

#2 2020-03-05 08:41:42

ToxicExMachina
Member
Registered: 2019-03-11
Posts: 210  

Re: Arduino version currency?

If you want to learn MCU programming avoid Arduino. Arduino may be a good solution only for the case of noskill dirty and fast primitive things like led blinking. I also recommend to buy a cheap ISP for flashing the microcontroller (bootloader in Arduino is very unreliable thing). USBasp is suitable device. It's very cheap (the price is about 1-3$) and simple.

apt-get install gcc-avr libc-avr avrdude
apt-get install any-text-editor-or-ide-like-code-blocks

AVR libc official site and manual: https://www.nongnu.org/avr-libc/
A simple example of AVR programming: https://www.tldp.org/HOWTO/Avr-Microcon … /x207.html
Another example of AVR programming basics: https://www.swharden.com/wp/2013-01-06- … -in-linux/

However, if you don't want to program microcontrollers you can just install Arduino IDE from repository and use it before you drop it after a couple of weeks or even a month. You can also download latest version of Arduino IDE from official website, unpack and run it.

Offline

#3 2020-03-05 10:45:44

noname
Member
Registered: 2019-09-25
Posts: 16  

Re: Arduino version currency?

ToxicExMachina wrote:

If you want to learn MCU programming avoid Arduino. Arduino may be a good solution only for the case of noskill dirty and fast primitive things like led blinking.

TBH i'm not sure what i want to learn... no more than necessary to get the job done, i think, seeing as i'm old as dirt, and have lots of projects to get dealt with before i'm done on this planet.

I'm deeply involved in what one might call the "off-grid/self-sufficiency" thing, seeing as how i've been off-grid since 2003 and solar since 2006, and prefer to be as self-sufficient as possible.  I'm currently working on eradicating all use of propane here, since it's an external dependency.  I'm getting close, i haven't used propane for cooking in maybe a year, but it still runs the on-demand hot-water-heater, so i'm working on adding an on-demand electric-hot-water-heater.  Since i'm doing this microwave/induction-cooktop/smart-oven business and running a standard 120v refrigerator on a 4.8kwh system, it needs to be fairly efficient.

Anyway, i found that the idle-overhead for my inverter was eating my lunch, so i set up a remote control to turn it on/off when it was needed.  And when the cheap 12v fridge i was using went tits-up, i went to a 120v fridge.  Then i discovered it was using more startup power than was workable given the overall system configuration (compressor), i hooked up an "Inkbird-All-Purpose-Temperature-Controller-ITC-1000" to the "INSMA Wireless RF Switch" that turns the inverter on/off, so that the inverter would start whenever the fridge temp is out-of-range. That whole business works reasonably well, but i'm pushing the limits of what can be done with one-way-communication, and sticking these off-the-shelf components together is a kludge, so i'm looking to get closer to the hardware so to speak, something more reliable and easier to use.

As mentioned, i have a starter Arduino kit, and also a book "Practical Electronics For Inventors" which i've barely cracked open, but it looks like it will supplement what little i remember from the EE classes required when i was in CSc back in the day.  From what i've gathered there are numerous u-ctlrs on the market, Arduino, Raspberry-Pi, and whatever one is in the Moto-Z4, which i was thinking of using as a control unit before i got disgusted with the thing.

I'm not sure which one is going to be best, but i'll spend a little time experimenting with the Arduino while i'm learning what i can from the book.  There are a number of projects that i have in mind, from thermo-electric fridge to a battery charger and suchlike.  I suspect that the Raspberry-Pi is the one that'll make it easiest to monitor the system remotely and collect data, but it's early days yet.  I totally suck at installing and configuring linux, but i'm not seeing the Arduino as quite that capable.

ToxicExMachina wrote:

I also recommend to buy a cheap ISP for flashing the microcontroller (bootloader in Arduino is very unreliable thing). USBasp is suitable device. It's very cheap (the price is about 1-3$) and simple.

ISP is "internet service provider", right?  New meaning, or typo? 

I'm a bit confused, AVR seems to be a specific series of microcontrollers, but it also seems associated with Arduino somehow.

In a nutshell, what's the simplest setup that'll let me control a bunch of inputs/outputs, maintain two-way wireless-communication with something that has a fullscreen interface of some kind, and write data logs that can be analyzed by the control system?

Offline

#4 2020-03-06 06:29:27

ToxicExMachina
Member
Registered: 2019-03-11
Posts: 210  

Re: Arduino version currency?

noname wrote:
ToxicExMachina wrote:

If you want to learn MCU programming avoid Arduino. Arduino may be a good solution only for the case of noskill dirty and fast primitive things like led blinking.

TBH i'm not sure what i want to learn... no more than necessary to get the job done, i think, seeing as i'm old as dirt, and have lots of projects to get dealt with before i'm done on this planet.

I'm deeply involved in what one might call the "off-grid/self-sufficiency" thing, seeing as how i've been off-grid since 2003 and solar since 2006, and prefer to be as self-sufficient as possible.  I'm currently working on eradicating all use of propane here, since it's an external dependency.  I'm getting close, i haven't used propane for cooking in maybe a year, but it still runs the on-demand hot-water-heater, so i'm working on adding an on-demand electric-hot-water-heater.  Since i'm doing this microwave/induction-cooktop/smart-oven business and running a standard 120v refrigerator on a 4.8kwh system, it needs to be fairly efficient.

Anyway, i found that the idle-overhead for my inverter was eating my lunch, so i set up a remote control to turn it on/off when it was needed.  And when the cheap 12v fridge i was using went tits-up, i went to a 120v fridge.  Then i discovered it was using more startup power than was workable given the overall system configuration (compressor), i hooked up an "Inkbird-All-Purpose-Temperature-Controller-ITC-1000" to the "INSMA Wireless RF Switch" that turns the inverter on/off, so that the inverter would start whenever the fridge temp is out-of-range. That whole business works reasonably well, but i'm pushing the limits of what can be done with one-way-communication, and sticking these off-the-shelf components together is a kludge, so i'm looking to get closer to the hardware so to speak, something more reliable and easier to use.

As mentioned, i have a starter Arduino kit, and also a book "Practical Electronics For Inventors" which i've barely cracked open, but it looks like it will supplement what little i remember from the EE classes required when i was in CSc back in the day.  From what i've gathered there are numerous u-ctlrs on the market, Arduino, Raspberry-Pi, and whatever one is in the Moto-Z4, which i was thinking of using as a control unit before i got disgusted with the thing.

I'm not sure which one is going to be best, but i'll spend a little time experimenting with the Arduino while i'm learning what i can from the book.  There are a number of projects that i have in mind, from thermo-electric fridge to a battery charger and suchlike.  I suspect that the Raspberry-Pi is the one that'll make it easiest to monitor the system remotely and collect data, but it's early days yet.  I totally suck at installing and configuring linux, but i'm not seeing the Arduino as quite that capable.

ToxicExMachina wrote:

I also recommend to buy a cheap ISP for flashing the microcontroller (bootloader in Arduino is very unreliable thing). USBasp is suitable device. It's very cheap (the price is about 1-3$) and simple.

ISP is "internet service provider", right?  New meaning, or typo? 

I'm a bit confused, AVR seems to be a specific series of microcontrollers, but it also seems associated with Arduino somehow.

Initially Arduino is 8-bit AVR-based board series with Arduino IDE. Form-factor of al of Arduino boards except arduino nano or similar ones is awful: it's large for final device and microcontroller is just soldered in. Thus it's a bad solution even as development board. For example, TI Launchpad is much better solution as devkit because it's full featured development board (it's based on energy efficient 16-bit MSP430 microcontroller). Some of new Arduino boards are based on ARM Cortex M core.

Arduino IDE is a nightmare. Yes - it's simple. But it's weak and doesn't let to learn anything. For example, from Arduino you won't understand how to send a signal through a pin: it's inside digitalWrite() function. This function is surprisigly inefficient and depending on version of Arduino IDE has different maximum frequency so it's hard to get predictable behavior when you need to use this board seriously. Arduino IDE doesn't let to build optimized code because it just doesn't give any way to set compiler options. Arduino IDE is also much more complicated than pure C with avr-libc. With Arduino IDE you'l never know how do you use CPU pins whereas in C with avr-libc you always know which port you use for sending a signal to a specific pin or group of pins simultaneously.

If you need data acquisition system you may look at ready-to-use solutions. You can find them as "USB ADC" or "External ADC". Search for devices with UART support: in this case you can use terminal for obtaining necessary data.

Raspberry Pi is also technically terrible solution. I don't know who designed RPi board but it's totally horrible. It's better to find industrial grade board with GNU/Linux support. You can practice with Raspberry Pi but be ready: Raspberry Pi will be broken eventually because it was not designed as a reliable device. Usually it ruining filesystem on SD card.

ISP - In-System programmer. It's a tool for firmware flashing. By the way, you can use Arduino board as ISP.

noname wrote:

In a nutshell, what's the simplest setup that'll let me control a bunch of inputs/outputs, maintain two-way wireless-communication with something that has a fullscreen interface of some kind, and write data logs that can be analyzed by the control system?

The simplest solution is ESP32 module with display. It has MCU, wireless communication and I/O pins.

Another solution is a board suitable for current task, NRF24L01 or similar module and a display for the board. I suppose you'l need an SD card slot. There are a lot of boards with STM32 (ARM Cortex M0-M4) microcontrollers. Recently STMicroelectronics made interesting thing: https://www.st.com/en/microcontrollers- … eries.html

Offline

#5 2020-03-06 07:34:23

noname
Member
Registered: 2019-09-25
Posts: 16  

Re: Arduino version currency?

It doesn't sound real encouraging but thanks.

edit:

I've had a look at the link you suggested, and did a search for "ESP32 module with display", which turned up some pricey ($150-ish) options along with a bunch of cheaper Arduino semi-equivalents ($20-ish).  The linked text mentioned that it used a standard open-source distro, which i fear will be some ubuntu flavor that uses system-d and i ain't going there no more, but this may be blind prejudice on my part, and they didn't *say* what distro...

The Moto Z4 (which i purchased mostly for the Hasselblad camera mod, and the Z4 seems (to me) like a fairly useless device since it has no bezels and capacitive touch is so jacked up it's almost impossible to control) has some onboard processor or other which seems like another possible alternative, if one wants to produce a Mod and wed himself to the phone; I'm fairly certain that i don't, i'm not even buying their camera Mod because the thing is too touchy to use imo, and the in-screen fingerprint sensor is both slow and stupid.

One thing i didn't mention is that for the various products i have in mind, i want to keep the parts-list simple enough that Joe Average-ish can buy the parts and build his own, as much as possible; i figure that should put a cap on the prices people have to pay for copies, since if having it made is too much one can build it himself.

Since i already have the Arduino to learn from, i'll see how far i can take the first project, which is a battery-string-controller.  The two-way communication issue is the one i expect to be the deciding issue.

Thanks again, i appreciate the assist.

Last edited by noname (2020-03-07 13:07:01)

Offline

Board footer