I am a newbie C programmer and I just started with Arduino web editor (Win10-Firefox)to code for a Raspberry Pi (3B) board. RPi is on line via ethernet connection.
I tried to compile an example from Garmin Lidar_lite v3HP for I2C, as available in the library collections for Arduino. When compiling the example I get after a while this error message:
Using library Wire in folder: /home/builder/.arduino15/packages/arduino/hardware/mraa/1.0.8/libraries/Wire (legacy)
Using library lidar_lite_3_0_3 at version 3.0.3 in folder: /home/builder/opt/libraries/latest/lidar_lite_3_0_3
/tmp/967842743/v3HP_I2C/v3HP_I2C.ino: In function 'void setup()':
/tmp/967842743/v3HP_I2C/v3HP_I2C.ino:51:18: error: 'class TwoWire' has no member named 'setClock'
Wire.setClock(400000UL); // Set I2C frequency to 400kHz (for Arduino Due)
^ exit status 1
Checking the arduino forum I find some similar question, but of many years ago and likely not applicable any longer.
I appreciate your expert inputs on how to resolve in simple terms. Thanks a lot! Greetz, Ivan
-
You're trying to compile code to run on a Pi? What core did you install into the IDE to do that?Majenko– Majenko2020年07月31日 17:01:09 +00:00Commented Jul 31, 2020 at 17:01
-
Yes, that is the intent. Arduino web editor offers possibility to select not only arduino boards, but also linux based ARM systems such as RPi board and also other SBC are supported by the web editor. I have seen Youtube tutorial that was demonstrating web editor en RPi.- see youtube.com/watch?v=yVS9zIcWa7w . That triggerd my interest.Ivan Herbots– Ivan Herbots2020年07月31日 17:40:27 +00:00Commented Jul 31, 2020 at 17:40
-
1Then probably the library in that (unknown?) core doesn't support that functionality. Maybe that functionality doesn't make any sense on a Linux computer where I guess the clock speed may be set in the DT overlay.Majenko– Majenko2020年07月31日 18:26:03 +00:00Commented Jul 31, 2020 at 18:26
-
Thanks for the reply. I tried again with the arduino on PC with RasPiDuino librarie and had no further problem. The resulting executable does work on a RPi3 wirh Buster OS. Apparently the arduino webeditor lacks some libraries to succesfully compile for raspberry . I continue this road. Item can be closed.Ivan Herbots– Ivan Herbots2020年08月11日 09:10:33 +00:00Commented Aug 11, 2020 at 9:10
-
You should write that as an answer then wait the prescribe period (if there is one) and accept your own answer. That way people looking for an answer to the same problem can easily find it.Majenko– Majenko2020年08月11日 09:21:08 +00:00Commented Aug 11, 2020 at 9:21
1 Answer 1
Thanks for the reply. I tried again with the arduino on PC with RasPiDuino librarie and had no further problem. The resulting executable does work on a RPi3 with Buster OS. Apparently the arduino webeditor lacks some libraries to succesfully compile for raspberry . I continue this road. Item can be closed.
-
If you now wish to delete your question, just use the 'delete' button on the question.sempaiscuba– sempaiscuba2020年08月31日 10:45:36 +00:00Commented Aug 31, 2020 at 10:45