6 ms·
Exactly. A low end micro-controller would do the trick but a Raspberry Pi is much more accessible - almost anyone can get one fairly quickly and if they themsel
by rullgrus 7y ago
Exactly. A low end micro-controller would do the trick but a Raspberry Pi is much more accessible - almost anyone can get one fairly quickly and if they themselves don't have the knowledge to do the setup they most likely know someone who can help.
- mrob 7y agoATmega micro-controllers also have great community support and documentation because of their use in Arduinos. If I was relying on an electronic device to protect my health I'd trust a simple 8-bit device more than something as complex as a Raspberry Pi.
- endymi0n 7y agoIf I was relying on an electronic device to protect my health I‘d trust my garbage collected code on a 64 bit ARM CPU using real CPU timers way more than my own ability to not segfault or OOM myself to death (literally) with low-level embedded C code. YMMV.
- zaarn 7y agoSegfaulting and OOM on MCU's is far more rare than on a device with an entire operating system on top. In most cases, MCU IDE's like the classic Arduino one don't even give you an allocator, all data must be statically allocated beforehand. IIRC it doesn't use the stack either. The main() and loop() functions initialize all their variables statically. When you have 2KB of memory to share between code, data and stack, allocating and using stack for function calls is luxury that only introduces problems. Hence, I've never ever ever seen an MCU crash from segfaults or OOMs. On the plus side they will also use vastly less energy. 10 Milliamps is enough to drive a ESP8266 or ESP32, in deep sleep you start counting microamps. A single battery cell can easily last a month.