Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Circuit Playground Lights?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Circuit Playground Lights?

by san02 on Mon Apr 20, 2020 5:21 pm

I'm not sure if this is a common problem but when trying to run a code segment depicting a light sequence, the lights show as colorful on the simulation on MakeCode but on the board they are plain white. Is this just a hardware problem with the board?

san02
 
Posts: 5
Joined: Mon Apr 13, 2020 9:58 pm

Re: Circuit Playground Lights?

by mikeysklar on Mon Apr 20, 2020 6:06 pm

Hello san02,

Can you point me to the code segment you are running or guide that you are following?

mikeysklar
 
Posts: 1995
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Lights?

by san02 on Mon Apr 20, 2020 6:18 pm

Sure!
Code: Select all | TOGGLE FULL SIZE
 light.setAll(0x000000)
    light.setBrightness(10)
    light.setPhotonMode(PhotonMode.PenDown)
    light.photonForward(Math.randomRange(0, 10))
    pause(70)
    light.setAll(0x000000)
    light.photonForward(Math.randomRange(0, 10))

Thanks!

san02
 
Posts: 5
Joined: Mon Apr 13, 2020 9:58 pm

Re: Circuit Playground Lights?

by mikeysklar on Mon Apr 20, 2020 7:56 pm

Is this the guide you are following for that code snippit?

https://learn.adafruit.com/neopixels-wi ... ode/photon

mikeysklar
 
Posts: 1995
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Lights?

by san02 on Mon Apr 20, 2020 8:01 pm

My code segment is an adaptation of what is provided on the Adafruit website.

san02
 
Posts: 5
Joined: Mon Apr 13, 2020 9:58 pm

Re: Circuit Playground Lights?

by mikeysklar on Mon Apr 20, 2020 10:26 pm

Gotcha.

Do you have a link to the example guide you are following on the Adafruit website? We have many so I'm just trying to understand which one you are following.

mikeysklar
 
Posts: 1995
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Lights?

by san02 on Tue Apr 21, 2020 3:14 pm

Hi,
So this is actually the proper code. For this code, its supposed to be flashing colorful lights and it shows like that on the simulation but on the board, its just white. There is also always one white light remaining on the board.
Code: Select all | TOGGLE FULL SIZE
light.setBrightness(125)
        light.setPhotonMode(PhotonMode.PenDown)
        light.setAll(0x000000)
        light.setPhotonPenHue(PixieColor)
        light.setPhotonPenHue(ScatterColor)
        light.photonForward(Math.randomRange(0, 400))
        light.photonForward(Math.randomRange(0, 100))
        light.setBrightness(70)
        PixieColor += 100
        ScatterColor += 100
        pause(60)

san02
 
Posts: 5
Joined: Mon Apr 13, 2020 9:58 pm

Re: Circuit Playground Lights?

by mikeysklar on Tue Apr 21, 2020 3:20 pm

Thanks. Which guide is this from?

mikeysklar
 
Posts: 1995
Joined: Mon Aug 01, 2016 8:10 pm

Re: Circuit Playground Lights?

by san02 on Wed Apr 22, 2020 8:54 pm

This is not from any specific guide!

san02
 
Posts: 5
Joined: Mon Apr 13, 2020 9:58 pm

Please be positive and constructive with your questions and comments.