Arduino sketches to Onion omega 2.
-
Re: Arduino and Omega
Would it be possible to port arduino sketches to the omega onion 2?
-
So long as there is no effort to make Omega2 as one of the Arduino supported boards
(i.e., as a part of the Arduino platform),
it is a waste of time trying to port sketch over.Currently, AFAIK, there is no such effort in place at all.
-
As @ccs-hello mentioned, not trivially. But Arduino sketches are just C/C++ programs with some helper functions and syntactic sugar sprinkled on top, so it wouldn't be an impossible undertaking porting a sketch and it's required libraries over to use Omega's GPIO.
Obviously things like power management and timings would be different it would never be a simple drop-in change, but if your code doesn't make use of things like that, it's definitely doable.
All that being said, you would most likely have an easier time of it just re-implementing the sketch from ground up on the Omega, or if you're really married to the Arduino IDE, getting a different, Arduino compatible, board like one of the ESP32-powered ones.
-
The Omeage2 has no analog, limited PWM, non-deterministic timing.
Arduinos have a varied number of analog, digital and PWM pins, are deterministic as to how long things take to run, have 'bank' i/o support (which I've not seen implemented on any copy device), software serial, sleep mode, ...
So, no.