sparkfun / SparkFun_HM01B0_Camera_ArduinoLibrary

Extensible library to use the Himax HM01B0 camera in Arduino
15 stars 4 forks source link

The Library is not working with Arduino RP2040 Connect #9

Open fethicandan opened 5 months ago

fethicandan commented 5 months ago

When I try to use the example code

` c:\Users\fethi\Documents\Arduino\libraries\SparkFun_Himax_HM01B0_Camera\src\hm01b0_c\src\hm01b0_c.c:20:2: error: #error "Unsupported platform: Submit an issue / pull request to https://github.com/sparkfun/SparkFun_HM01B0_Camera_ArduinoLibrary to add support for your target"

error "Unsupported platform: Submit an issue / pull request to https://github.com/sparkfun/SparkFun_HM01B0_Camera_ArduinoLibrary to add support for your target"

^~~~~

Using library SparkFun Himax HM01B0 Camera at version 0.0.3 in folder: C:\Users\fethi\Documents\Arduino\libraries\SparkFun_Himax_HM01B0_Camera exit status 1

Compilation error: exit status 1 `

I faced with this problem. How did you solve this problem?

oclyke commented 5 months ago

Hi @fethicandan, can you provide more information about your setup?

For example:

This library presently only has built-in support for the Apollo3 series of boards which use the Apollo3 Arduino Core.

Specialized platform support is needed to read the signals from the camera module.

There are details about platform support here: https://github.com/sparkfun/SparkFun_HM01B0_Camera_ArduinoLibrary/tree/master/src/platforms

oclyke commented 5 months ago

@fethicandan I just added more details about supporting new platforms to #8. Perhaps those details will help you figure out what needs to change in order to support the RP2040

fethicandan commented 4 months ago

Thank you so much for your messages.

When I looked the Arduino reference website:

https://www.arduino.cc/reference/en/libraries/sparkfun-himax-hm01b0-camera/

In the reference documents+, it is written:

Compatibility This library is compatible with all architectures so you should be able to use it on all the Arduino boards.

Therefore, I supposed that it works all the Arduino boards.

I am using Arduino Nano RP2040 Connect.

oclyke commented 4 months ago

Ah, I see. I just took a loot at the link you sent and it appears to be a listing of the basic information about this library on the Arduino index. This is possible because SparkFun provides information to Arduino regarding their libraries. In fact anyone can do this with a library they create. For this library the info is in the library.properties file. You can see the line that says architectures=* and this is the source that Arduino looks at to determine that the library is compatible with all architectures.

Though the library is not technically restricted to any particular architecture the effort hasn't been made to support any additional platforms.

If you have the time you could help change that with a pull request. Here are just two options:

1) Submit a PR that changes the architectures option to something more informative for the present state of things, like Apollo3 or something. (Would be best to look up the proper term to describe the Apollo3 parts in Arduinoland)

2) Submit a PR that enables this library to work on RP2040. If you choose to go this route I can offer some limited guidance / review (but can't make any promises.)