1

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

5
  • You're trying to compile code to run on a Pi? What core did you install into the IDE to do that?
    – Majenko
    Jul 31 '20 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. Jul 31 '20 at 17:40
  • 1
    Then 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
    Jul 31 '20 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. Aug 11 '20 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
    Aug 11 '20 at 9:21
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.

1
  • If you now wish to delete your question, just use the 'delete' button on the question. Aug 31 '20 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.