You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was writing program with MakeCode(JavaScript mode) and this package.
I finished coding and try to convert my program to block.
But when I look at block programs...i noticed. Value runs away!!!
What's it like?
like this image.
What kind of program were you writing?
There's JavaScript source code. (Sorry for comment written by Japanese)
//絶対これブロックに変換するなよ!!!絶対だからな!!!フリじゃないからね!!!!いやほんとに!!!!!input.onButtonPressed(Button.A,function(){//ここはon/off切り替え処理です 基本いじらなくていいとおもふif(!onflag){onflag++;}else{onflag=0;}})input.onButtonPressed(Button.B,function(){//明るさ調節 今は5段階にしてるけど調整したかったら調整してねif(brightness==20){//減らしていく値を変更したときにいくつで最大に戻すかbrightness=100;//MAXは100です}else{brightness-=16;//16ずつ減らしていく}})
let onflag=0,brightness=100,strip:neopixel.Strip=neopixel.create(DigitalPin.P1,9,NeoPixelMode.RGB);//初期化の翁while(onflag){//onのときだけ実行されるやつらfor(letl=0;l<=8;l++){//真ん中以外の制御if(l==4){continue;}//真ん中を飛ばすstrip.setPixelColor(l,neopixel.hsl(randint(0,50),360,(input.soundLevel()/255*300+60)*brightness/-100+360));//大体赤~オレンジでランダムにしてる うるさいと暗くなります}strip.setPixelColor(4,neopixel.hsl(0,0,brightness*3.6));//真ん中の制御 白~黒にしてるけど文句あったら言ってねstrip.show();//表示basic.pause(1);//1/1000秒のリアルタイム更新}
Could you fix this? Thanks
The text was updated successfully, but these errors were encountered:
What's the problem?
I was writing program with MakeCode(JavaScript mode) and this package.
I finished coding and try to convert my program to block.
But when I look at block programs...i noticed. Value runs away!!!
What's it like?
like this image.
What kind of program were you writing?
There's JavaScript source code. (Sorry for comment written by Japanese)
Could you fix this? Thanks
The text was updated successfully, but these errors were encountered: