Skip to content

the-developer-guy/NativeArduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NativeArduino

Native drivers for Arduino boards (or to be more precise, for the microcontrollers commonly found on Arduino boards)

Why?

Not just "why not?".

Arduino is a great platform for beginners and "lazy" pros too. I know, once I made a current logger in 15 minutes with an Arduino and an I2C current sensor for a professional project. It worked GREAT!

But sometimes you just want to stay. STM32 HAL is wonderful, but many people get used to the really simple Arduino functions, and it can be a limiting factor! analogWrite() and tone() are easy to use, but lack the fine control. digitalWrite() is a huge function compared to what it actually does. And sometimes you need a smaller, faster, more versatile driver.

Yes, "just move to a bigger microcontroller" exists. I always encourage people to choose the right tool for the job like "don't use SoftwareSerial if you need 2 UART ports, use a board with enought peripherals", but most frameworks waste precious CPU time, untapped possibilites exist.

The goal is to provide a usable driver pack for the common boards while explaining the depth of the hardware for those, who want to learn.

Example

The builtin digitalWrite() function - while it's easy to use - has to do a lot of stuff to do. Way too much. Let's compare the speed of simple pin toggling:

void loop() {
  digitalWrite(13, HIGH);
  digitalWrite(13, LOW);
}

VS.

void loop() {
  pinSet(PIN_13_PORT, PIN_13);
  pinClear(PIN_13_PORT, PIN_13);
}

measurement

About

Native drivers for Arduino boards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published