Author Topic: Adapting the Arduino IDE for certain Linux-based SBCs  (Read 102 times)

0 Members and 1 Guest are viewing this topic.

Offline Scratch.HTF

  • Regular Contributor
  • *
  • Posts: 71
  • Country: au
Adapting the Arduino IDE for certain Linux-based SBCs
« on: November 07, 2019, 07:22:11 am »
With a quick search, I came across RasPiArduino which enables Arduino sketches to run on the Raspberry Pi with hardware support for I2C/SPI/UART (I've seen a similar tool for the BeagleBone as well).
But I wish to run Arduino sketches on other Linux-based SBCs (the one I am talking about is based on the HiSilicon KIRIN 970 - ARM64), so what are some general guidelines for adapting RasPiArduino (or similar specified tool) to other SBCs including making use of hardware functions (I2C, SPI, UART etc. which can include multiple ports for each hardware function)?
If it runs on Linux, there is some hackability in it.
The following users thanked this post: wnorcott

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 6535
  • Country: us
Re: Adapting the Arduino IDE for certain Linux-based SBCs
« Reply #1 on: November 07, 2019, 09:18:46 pm »
TeensyDuino seems to do a similar thing in that it allows Arduino(like) sketches to run on an ARM processor.  Teensy 4.0 is one of the new boards.
In effect, there are libraries that contain all of functions of the Arduino libraries and they are named the same and have the same parameters.  The underlying hardware is nowhere near identical.

It seems like a pretty big project!

Offline wnorcott

  • Regular Contributor
  • *
  • Posts: 53
  • Country: us
  • I like making projects with the ESP32
Re: Adapting the Arduino IDE for certain Linux-based SBCs
« Reply #2 on: November 09, 2019, 01:53:33 am »
You can but maybe explain what’s the end goal?    If you want to run a much more powerful than Arduino device that supports IDE and also a much wider array of dev environments I would suggest you look into the ESP32 that has integrated Wifi is much faster and more of everything an Arduino would have. ESP32 supports virtually the entire set of Libs now including peripherals.   For about five dollars.

It also gets around all the TTL level conversion 5 V hassles causes by arduino platform

Now if its a Arduino emulator you want to run on Pi or BeagleBone having the BB for example as both emulator and dev platform that would be interesting.   On the other hand turning a BB into an arduino seems like a huge waste of both Linux and the H/W.  Beaglebone especially with its zillion GPIO pins and the two dedicated realtime compute units separate from the GPU.
On very rare occasions, you might notice an odor or see a puff of smoke or sparks vent from your product.

Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo