I'm not sure if you've dealt with Arduino in Processing, but it is exactly as you describe.
void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
}
Re:Windows 10 IoT Core for Raspberry Pi 2
by nbadg on Wednesday August 12, 2015 @11:24AM
(#10048205)
Arduino is awesomely easy in this regard, but lacks a proper operating system, and the individual pins have fewer modes than systems on a chip. That is, in a way, exactly my point: the operating systems we have are so bad at portable systems that going without one can actually make development easier. That's a big problem.
I think this is a 'right tool for the job' problem. Frequently you don't need an operating system to do basic tasks. I don't see this as a problem at all for simple things to a point.
Even something that seems as complex as as reading a sensor and writing data out to a CF card doesn't require an OS if the basic library support is there.
Re:Windows 10 IoT Core for Raspberry Pi 2
by teekert on Wednesday August 12, 2015 @01:37AM
(#10046210)
Like this?
from time import sleep
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(2, GPIO.OUT)
while 1:
GPIO.output(2, False)
sleep(2)
GPIO.output(2, True)
Perhaps I'm not understanding what you want exactly, you seem to know what you're doing.
Re:Windows 10 IoT Core for Raspberry Pi 2
by nbadg on Wednesday August 12, 2015 @11:22AM
(#10048194)
The problem is in pinmuxing. If you want to change the pins from their default modes, you're in for a world of pain. Systems on a chips (SoCs, basically run everything portable these days) are optimized to the point where different die pins can have different modes (GPIO, LCD framing, USB framing, might all be available, one at a time, on the same pin). Switching between them requires mucking about in the kernel and reconfiguring hardware and is, at least in my experience, incredibly painful.
Also, the sysfs mappings that the easy bindings tend to be written from are very, very slow (like ~3+ orders of magnitude slower than they should be: http://hackaday.com/2013/12/07/speeding-up-beaglebone-black-...).
Absolutely, and especially in corporate environments. I'm not saying Windows 10 IoT is any better (I think it's very unlikely to be, but I also haven't evaluated it), but I can say for certain that I wish I had a single, identical python library for any IoT platform that handled interfaces as simply as:
Now, there are some libraries that approach that level of simplicity once you have your system configuration set up, but that doesn't lend itself to agile development. I want something that works like that out-of-box -- flash it, load code, press go button -- which simply doesn't exist. And, after spending a lot of time writing my own hardware IO library using direct memory access in Python, I don't think there's an OS out there that's capable of doing it (yet). I've spent just way too much time accommodating unfortunate abstractions taken at the linux kernel level (that I understand for historical reasons, but disagree with for future ones). An operating system for IoT done right is, in my opinion, a very lightweight exokernel with some really smart abstractions that just gets out of your way. Then you need a clever (and native) secure networking system, and you're in very good shape.