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 loaded this on 2 Adafruit Curcuit Playgound devices. They synch start, but despite being told to pick a random number of repeat times, both controllers repeat the loops the same amount of times. So the sequence progresses through the music in the same way. Why would the random seed be the same each time it is run?
Describe the bug*
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Add screenshots to help explain your problem. You can copy paste the screenshot in the github report. The .gif screen recording is very useful as well.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I ran into this too. I believe the random seed is hardcoded for the SAMD21 boards (like CPX), and this is an issue upstream rather than in pxt-adafruit.
For example a simple program that prints 20 random numbers in the range 0-10:
input.buttonB.onEvent(ButtonEvent.Click, function () {
for (let i = 0; i < 20; i++) {
console.log(Math.randomRange(0, 10))
}
})
https://makecode.com/_CYU1mq4atcRV
I loaded this on 2 Adafruit Curcuit Playgound devices. They synch start, but despite being told to pick a random number of repeat times, both controllers repeat the loops the same amount of times. So the sequence progresses through the music in the same way. Why would the random seed be the same each time it is run?
Describe the bug*
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Add screenshots to help explain your problem. You can copy paste the screenshot in the github report. The .gif screen recording is very useful as well.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: