-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry Pi Pico as a potential target #1415
Comments
Hey @RobertSundstrom, did you check if you can get it to work with Mono or nano-framework? If any of those two work we will likely be able to give you some pointers |
What likely will work is put a Firmata Firmware on it and access it using the Arduino binding. But of course that's not quite the same as running .NET code on the MCU itself. |
nano-framework should work too I think but it's not straightforward yet how to get .NET IoT run on it |
+1 for .NET nanoFramework which is a more reasonable target for such a processor. Check it out https://github.com/nanoframework/Home. There are already some contacts to see how to make that happening! |
[Triage] The .NET nanoFramework community is working on a port to have .NET nanoFramework supported. This will take a little time. |
The only issue is that nanoFramework doesn't support .NET standard libs (yet?) as far as I'm aware. Makes sharing code between platforms a little more tricky, and all the IoT libs here unusable. NanoFramework has it's own specialized packages. |
@nh43de Yes, that's absolutelly a limitation. We'll certainly be trying to support the Raspberry Pico trough our new Firmata binding. Unfortunatelly, there's currently no support to build for the Pico using the Arduino IDE (yet), which will cause an unknown extra effort in building that library. I also don't have the hardware so far. But please don't expect that you'll be able to run a full framework on the Pico, it's hardware (especially the memory) is to limited for that. |
@nh43de it has the possibility to use .NET standard as project reference, then everything needs to be compiled for nanoFramework. mscorlib is a small subset of the full framework. With minimum numbers of methods. |
Now that the Pico does have Arduino IDE support, can we expect some firmata capabilities? @pgrawehr |
@Mallon94 As far as I know, there are only projects in Beta state right now (or are you looking at a specific toolkit)? I have not tested any of those yet, for lack of time. In theory, it should be easy: Check out https://github.com/pgrawehr/ConfigurableFirmata (branch develop!), and update the file "Boards.h" to include the hardware configuration for the pico. |
@pgrawehr Thanks for the advice. I had a quick look at using configurablefirmata and updating the Boards.h file, however it still would not recognise the board everytime I tried to compile. It appeared like the name was wrong in the Boards.h file but i was using the correct build identifer from the boards.txt pico file. I found there is something in works http://abyz.me.uk/picod/index.html that looks like a nice firmata alternative. |
@Mallon94 Can you tell me which pico-for-arduino library you tried? I might give it a go if you want (I do not have the hardware, but maybe at least I could get it to compile) |
@pgrawehr that would be great! Im using this https://github.com/earlephilhower/arduino-pico and using the standard board, not a variant. |
@Mallon94 I have created a branch "Pico" that builds (use the ConfigurableFirmata.ino file from the folder with the same name). Since the Firmata protocol doesn't currently support pin selections, I have hardcoded that the I2C bus is on GPIO pins 4 and 5 (if enabled) and SPI is on GPIO pins 6-9. As said, I do not have the hardware, so it would be nice if you could do some testing. |
Thanks for your time @pgrawehr I appreciate it. I tried that branch, but it was having compile errors. Did you hardcode the SPI using SetTX and SetRX? |
It seems you have a different board setting or something like that. If I purposedly missspell that call, the error message is Not sure why the type is Look for lines such as the following in the output:
and
Does it list more than one candidate? |
I fixed it, was defaulting to a different board i had previously installed which was a Mbed OS RP2040 board. Got rid of it and it used 1.1.0 of the Pico lib. DHT was causing a timeout and preventing build so i disabled it and it built! Will get testing this now. |
FYI I updated the Arduino Firmata Boards.h file to include this:
and so far, so good - I can retrieve the board capabilities and blink an LED. I've not done this before so not sure if the above is entirely correct - I've ignored I2C and SPI for now. |
@mattjlewis That sounds good. I have (since a few days) full repo access to firmata and intend to add support for all the never boards (Pico, but also ESP32, Arduino Due) as soon as I get to it - It's all tested and ready, I just need to merge stuff together. So you could be creating a PR on firmata/ConfigurableFirmata if you like (ideally with I2C/SPI). |
FYI I can confirm that I2C works, raised this issue in ConfigurableFirmata: firmata/ConfigurableFirmata#115. I'll retest against the latest codebase (I had used the 2.10.1 release from 2018 and had to modify a couple of files) and submit a pull request instead. |
Would it be possible to target Raspberry Pi Pico?
See my discussion: dotnet/runtime#47270
The text was updated successfully, but these errors were encountered: