microsoft / devicescript

TypeScript for Tiny IoT Devices (ESP32, RP2040, ...)
https://microsoft.github.io/devicescript/
MIT License
3.28k stars 118 forks source link

Add support for setStatusLight in pico-w #404

Closed pelikhan closed 1 year ago

pelikhan commented 1 year ago

setStatusLight needs to talk to talk to the wireless chip to control the onboatd LED on the pico-w.

pelikhan commented 1 year ago

The onboard LED does not seem to work on pico/pico-w

lukeh990 commented 1 year ago

I'm trying to use setStatusLight on a regular Pico and I get a error reading JDUSB Error: crc err

Here is what the code I'm running in main.ts:

import { setStatusLight } from "@devicescript/runtime";

console.log(":)");
await setStatusLight(1);
pelikhan commented 1 year ago

Is this a fresh install? Could you try to flash the firmware again. We just did a release with sockets support.


From: Luke Harding @.> Sent: Monday, June 5, 2023 6:48:52 PM To: microsoft/devicescript @.> Cc: Peli de Halleux @.>; Author @.> Subject: Re: [microsoft/devicescript] Add support for setStatusLight in pico-w (Issue #404)

I'm trying to use setStatusLight on a regular Pico and I get a error reading JDUSB Error: crc err

Here is what the code I'm running in main.ts:

import { setStatusLight } from @.***/runtime";

console.log(":)"); await setStatusLight(1);

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/devicescript/issues/404#issuecomment-1577771514, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA73QKLM7G6OS625YI5IQV3XJ2EAJANCNFSM6AAAAAAYPAB3SE. You are receiving this because you authored the thread.Message ID: @.***>

lukeh990 commented 1 year ago

@pelikhan Yes, I just started messing around with devicescript today. Re-Flashing doesn't seem to have an effect.

pelikhan commented 1 year ago

we might have been in the middle of upgrading the firware. could you try to upgrade the vscode extension and create a new project for the pico?

pelikhan commented 1 year ago

@mmoskal it seems that setStatusLight is not working on the pico itself.

JackTam1993 commented 1 year ago

I met the same problem. the firmware and the vscode extension are the latest.

Raspberry Pi Pico W version: v2.10.900