3 ms·
The Arduino library provides a lot more flexibility compared to the bare AVR + libc, but at the expense of performance. Notably using digitalWrite() can be up t
by ksrm 13y ago
The Arduino library provides a lot more flexibility compared to the bare AVR + libc, but at the expense of performance. Notably using digitalWrite() can be up to 50x slower than writing to the port registers directly.
- marssaxman 13y agoYes, but you can still write to the port registers directly. Using the Arduino libraries doesn't lock you out of anything. There's a smooth, continuous path from high-level C++ abstractions built on the Arduino primitives down to the bit-twiddling low-level C world. If you're walled off in a Javascript VM, you can never have that kind of transparent access to the hardware - which seems like a big problem when you are building electronics, and controlling the hardware is the entire point of the job.