4 ms·
It's pretty trivial to do so on Arduino though. void setup() { pinMode(LED_BUILTIN, OUTPUT); } void loop() { digitalWrite(LED_BUILTIN, HIGH);
by jfim 6mo ago
It's pretty trivial to do so on Arduino though.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
- KPGv2 6mo agoWell first you have to learn the Arduino programming language. And the stdlib.
- telotortium 6mo agoGood thing LLMs exist now
- grogenaut 6mo agoit's literally the hello world of micros. get an arduino, plug it into the usb, install the ide, new -> example -> 01. Blink. Press Run. Cool you have now blunk a led. Now use AI to draw the rest of the owl.
- bombcar 6mo agoIt's easy once you've done it - but before you've done it (for me at least) it was much easier to just install a Linux on a Pi and run a bash script than to learn how to program an Arduino. (Of course, there are those to whom an Arduino is an overpriced piece of junk and they don't understand how I can't solder a three cent chip myself.) But let's be realistic - all of these things are like my Steam library - purchases made but never used (I have a drawer full of Pis and other SBCs, and Arduino dev kits, etc. Someday I'll have time time time!).
- jfim 6mo agoIt's C++, and basically what Arduino gives you is int main() { setup(); for(;;) loop(); } As well as a GUI to easily flash devices and view the output from the serial port, as well as import libraries that do all of the hard work like say making a serial port on any microcontroller pin or control external devices like light strips or displays. I'd assume the average user on HN should be able to figure it out pretty easily.
- numpad0 6mo agoThey don't call it C++ because that sounds too difficult. But it's literally, not like a simplified subset that compiles into an IL using a formally proven tool, but as in literally compiled using GCC as, C++.
- extraduder_ire 6mo agoCalling it c++ might give the wrong impression to some people too, since it doesn't have the STL, rtti, or exceptions for boards like the Uno r3. It is c++ though. Just limited in similar ways to the US air force's requirements for using the language.