Skip to content
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

Blink example not working on RPI Pico #12

Open
siashish opened this issue Apr 4, 2024 · 6 comments
Open

Blink example not working on RPI Pico #12

siashish opened this issue Apr 4, 2024 · 6 comments

Comments

@siashish
Copy link

siashish commented Apr 4, 2024

I try to run the blink example on rpi pico with default board lead on pin 25.
but led not blink on pico.
Anyone have any suggestion, whats going wrong there.
Thanks for the support.

@deadprogram
Copy link
Member

Hello @siashish

If you change this code here to the pin number on your board it should work: https://github.com/hybridgroup/mechanoid-examples/blob/main/blinky/modules/blink/main.go#L10

Hope that helps!

@siashish
Copy link
Author

siashish commented Apr 5, 2024

Hi @deadprogram

Despite changing the pin within the same code base for the Raspberry Pi Pico to pin 25, it still does not function as expected.

@scottfeldman
Copy link

Is it a Pico or Pico-W? I remember blinking the LED on Pico-W requires going thru the Wifi device somehow. I think @soypat has Pico-W LED working, but outside the TinyGo code base.

@soypat
Copy link

soypat commented Apr 6, 2024

@siashish if you do in fact have a Pico W you can try the following program to blink the LED and verify the LED is not damaged https://github.com/soypat/cyw43439/blob/main/examples/blinky/blinky.go

@deadprogram
Copy link
Member

Just tried with a Pico changing to led = machine.Pin(25) and it is blinking

PXL_20240406_120224813.TS.mp4

@Sandesh-verma
Copy link

Sandesh-verma commented Apr 11, 2024

HI @scottfeldman, @soypat
We are using PICO_W and the led is working fine. We have cross checked with (https://github.com/soypat/cyw43439/blob/main/examples/blinky/blinky.go) this example.

But when using mechanoid example blinky for PICO_W , we faced the below issue after running the mecha build command -

user:~/mechanoid-examples/blinky$ ls
go.mod  go.sum  main.go  modules  README.md

user:~/mechanoid-examples/blinky$ mecha build
Building module blink
Done.
package github.com/hybridgroup/mechanoid-examples/blinky/modules/blink
	imports github.com/soypat/cyw43439
	imports github.com/tinygo-org/pio/rp2-pio
	imports device/rp: build constraints exclude all Go files in /home/user/.cache/tinygo/goroot-1300efd6eec7ee073f4512e2eb558a951848cb6a899247aebb806e8f806dc738/src/device/rp
tinygo build error /home/user/mechanoid-examples/blinky/modules/blink: exit status 1
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants