News for hackers. Stuff that matters.
Re:The End of Arduino 101: Intel Leaves Maker Market by jldugger on Tuesday July 25, 2017 @11:40AM (#14848571)
These are mostly true, but it's pretty trivial to design your own Atmel AVR board.

> Linux is rare among production systems.

AFAIK, Arduino has no OS, let alone Linux. It's a giant wrapper around "setup(); while (true) loop();" Which is itself a gigantic problem for power savings. Fortunately there exist alternative platforms, and some even run on the same Arduino platform: https://github.com/jmattsson/tinyos-arduino

Re:The End of Arduino 101: Intel Leaves Maker Market by dekhn on Tuesday July 25, 2017 @11:55AM (#14848716)
Personally, I like FreeRTOS. I got an ESP8266 and starting writing programs right away. There's no VMM, no true multitasking, but it's better than raw arduino. I managed to port Zork in an afternoon.
Re:The End of Arduino 101: Intel Leaves Maker Market by pjmlp on Tuesday July 25, 2017 @12:07PM (#14848849)
I think ESP32 is even better for playing around, given the 512 KB.
Re:The End of Arduino 101: Intel Leaves Maker Market by nerfhammer on Tuesday July 25, 2017 @12:01PM (#14848791)
re: power savings, use interrupts and sleep modes. You should be able to get power < 1µA
Re:The End of Arduino 101: Intel Leaves Maker Market by abritinthebay on Tuesday July 25, 2017 @12:12PM (#14848906)
Could you expand on that a little for interested but not totally proficient users?
Re:The End of Arduino 101: Intel Leaves Maker Market by gh02t on Tuesday July 25, 2017 @12:45PM (#14849304)
You can use the standard AVR sleep modes and interrupts on Arduino. Put the uC to sleep and have it wait for a pin to change or a timer to elapse before waking instead of idling at full power. See the Arduino docs (or the Atmel datasheets, which are easy to read):

https://playground.arduino.cc/Learning/ArduinoSleepCode

There are libraries that do this automatically on Arduino too, allowing you to schedule [cooperative] multitasking and sleep the uC between tasks. E.g.

https://github.com/arkhipenko/TaskScheduler

is really good, I've used it before. You basically queue up a list of task callbacks and a schedule in your `setup()` and then do a call to `tasks.execute()` in `loop()`, which pops off the next task that is due in a queue or sleeps otherwise. It's simple, but much more straightforward than manually using `if millis() - last > delta1... else sleep()` and not as rigid as using the timer ISRs (which really serve a different purpose).

On more complex platforms you can also use an RTOS, which is kind of like a more beefed up version of this model. Actually you can do this on AVR too, but I haven't ever seen anybody actually use FreeRTOS/ChibiOS/whatever on AVR.

Re:The End of Arduino 101: Intel Leaves Maker Market by Grazester on Tuesday July 25, 2017 @02:54PM (#14850762)
This is relevant to my interests being that I just got into this Arduino thing. Thank you
Re:The End of Arduino 101: Intel Leaves Maker Market by HeyLaughingBoy on Tuesday July 25, 2017 @04:59PM (#14851801)
Bear in mind that while what he said is correct, there are other concerns on an assembled board, as opposed to the bare chip. Arduino has a voltage regulator that is always consuming current. The Power LED is always consuming current. You should be sure to set pin 13 (the indicator LED) as an output and turn it off, since even as an input, there will be leakage current through the LED. The other active components on the board have their own quiescent current levels, etc.

You can get an AVR device to run on a coin cell for months or years (I have a design that does just that). You'd have to modify an Arduino significantly to do the same.

Re:The End of Arduino 101: Intel Leaves Maker Market by gh02t on Wednesday July 26, 2017 @11:26AM (#14856994)
Very true, though there are some better Arduino variants. The Pro mini is the canonical "low power" Arduino as it uses a very efficient LDO regulator. I also use bare ATTiny's for a lot of uses, they don't require any passives and can run directly from a LiPo as long as you use a protected cell or connect a feedback line to the ADC.
Re:The End of Arduino 101: Intel Leaves Maker Market by nerfhammer on Tuesday July 25, 2017 @12:23PM (#14849028)
An arduino is a microcontroller with a few conveniences added. There are plenty of microcontrollers inside of devices that last for years on tiny coin cell batteries. You can program it to go into an ultra low power sleep mode and wake the instant you press a button or on a predefined schedule, do whatever business you want it to do for a few moments, then go back into ultra low power sleep. Some microcontrollers are more optimized for this use case than others, but plenty of ordinary ones are and they've gotten incredibly good at it.
Re:The End of Arduino 101: Intel Leaves Maker Market by abritinthebay on Tuesday July 25, 2017 @12:48PM (#14849335)
Ah I see what you mean. I thought you were referring to something more complex than that (specifically regarding interrupts). Makes perfect sense.
Re:The End of Arduino 101: Intel Leaves Maker Market by jldugger on Tuesday July 25, 2017 @04:37PM (#14851639)
Which is precisely what TinyOS does.