5 ms·
The part that's missing in the comparison: Elliot 405: Used to run business calculations Pi Zero: Used run a sprinkler system What has been really interest
by rebootthesystem 11y ago
The part that's missing in the comparison:
Elliot 405: Used to run business calculations
Pi Zero: Used run a sprinkler system
What has been really interesting to me over the last several years that these stick computers have been around is how people are using giga-Hertz range processors with an huge operating system and truckloads of memory for stuff that's easily done with a small 8 bit processor with K's of RAM vs G's of ram and a simple time-sliced tasking mini OS written in an afternoon.
Don't get me wrong, it's great that one can buy a computer like the Pi Zero for $5. I'm afraid something is being lost in the process. Maybe it doesn't matter. I mean, if one can get something the size of your pinky that cost less than coffee at Starbucks to run Linux...
- soared 11y agoHow many people do you really think can just casually write an OS? I can set up automated almost anything with almost no lines of code. We've lose the specialization because so many people now have access to these incredible things.
- Someone 11y agoPeople not being able to write an OS is part of "I'm afraid something is being lost in the process" You don't need a memory allocator, file system or scheduler for an 'OS' that runs a single task.
- HeyLaughingBoy 11y agoNothing is being lost in the process as long as we continue to churn out people who are still interested in the low-level bits of the process. I used to point out to people that the control algorithm they were so laboriously writing on their PIC/AVR (now Arduino...) could be replaced with a 20 cent transistor and a handful of diodes and resistors. For exactly the same reason: the overkill bugged me and I was bothered that "kids today" weren't learning things "the right way." Then I began to shut up because I realized I was looking at progress. We don't need experts in analog electronics to build basic control systems: a web hacker who learns C can handle the simple stuff (emphasis on simple). Likewise, I now find myself telling others to forget about building 555 timer circuits or elaborate digital contraptions to sequence their LEDs and relays and just buy a $5 Arduino Nano and get it done in a few minutes. It's progress!
- rebootthesystem 11y agoExcept that the higher up you get in hardware the more everything turns into analog again. All of a sudden one's and zero's are not one's and zero's any more! :)
- sklogic 11y agoHow many embedded applications really do need any OS at all?
- dcposch 11y agoYou definitely don't have to write your own an OS. You use existing tools, for example FreeRTOS. It's surprisingly simple. With a microcontroller, you can have a pretty much complete understanding of the whole machine. All you need is a basic knowledge of C, and most of the people who would solder stuff to a Raspberry Pi already have that or are willing to learn. Say you're making a thermostat. By convention, you leave address 0x0 empty, since dereferencing the NULL pointer is bad form :) At address 0x4 you have a int containing the target temperature. At address 0x8 you have a int containing the current measured temperature. Your whole app uses 8 bytes of memory, plus a few more for the stack. You write a loop. It reads a few GPIOs, updates those two values, does a bit of logic to decide whether to turn on the heat, then writes one more GPIO to turn the heater on or off. GPIOs are "general purpose IO", metal pins that can be individually set to, say, +5V or 0V. The beauty of this is that if you write it cleanly and debug it and test it once, it will work perfectly forever. It will never throw up a popup that says "a new version of Ubuntu is available". It will never ask you to download 80MB of Java. It will never auto update. The server will never go down, because there is no server. It feels totally different from typical software development. You're writing a bit of C, but you're not making an "app" with all the complexity and flakiness that entails. You're creating an embedded device. And a wise man once said... "Hardware eventually fails. Software eventually works." --- PS, here's a fire alarm that runs Linux. https://www.youtube.com/watch?v=BpsMkLaEiOY https://www.youtube.com/watch?v=BpsMkLaEiOY Complexity is cheap now. You can get a full Linux PC with systemd, X11, Gnome, DBus, Java installed, the full works for $5 and in a tiny form factor. You could make a thermostat that way---but just because you can doesn't mean you should!
- rebootthesystem 11y agoNot hard at all. Setup a 1 ms timer interrupt (the ONLY interrupt in the system) and fire-off non-preemptive tasks in a loop. Bingo! You have an OS that is good enough to maintain a clock, attend to a serial port, even USB (via FTDI chip or similar), blink some LED's and, yes, control the sprinkler system. If you have a little more time, setup a FIFO a linked list or some other structure and have the keypad scanning routine issue messages that are then picked-up off the FIFO by a separate message processor routine that parses them and acts accordingly. In other words, not tasks can send each other messages through a very simple mechanism. And now, with that in place, you can modify your serial or USB port handler to also allow you to place the same messages into the FIFO. What you've just done is enabled full remote control of your sprinkler system with very little code. Now sensors (rain?) can also insert messages into the message loop and make things happen. Change the LED routine to pick-up "LED" messages of the loop. Now you can control the LED's remotely through your serial port. Then you get a little more ambitious, buy one of those Digi modules that turns an Ethernet connection into a serial port and write simple code that allows you to have said module insert messages into the message loop. Now you can control your sprinkler system from any network location at home. Not that hard at all. No need for Linux. Just start with a 1 ms timer interrupt and the rest is easy as pie. By throwing a server-grade OS at controlling a sprinkler system people are not learning the most basic things about computing.