#help-with-makecode

1 messages · Page 6 of 1

broken charm
#

Ah yeah, circuit playground express uses a samd21g

#

Not an M4 same/d

#

Okay so here’s what I’m thinking

#

MakeCode doesn’t support the Port C and Port D pins currently

#

All the M4 boards that are supported are only using port a pins and port b pins

#

So it might not be possible to use all the pins on the Grand Central M4 Express without messing with stuff under the hood

tight oar
#

I understand... that's really helpful @broken charm cause I was losing my mind hahaha. Thank you, I'll ask the developers as well and let's see what do they think. Thanks you bro!

broken charm
#

Can you link me to where you are looking?

#

I’m wanting to see how easy it is to modify the DAL look up tables to add support

tight oar
#

What do you mean exactly? Tbh, I have know idea about DAL and how to modify it, I just have the uncompleted board files, I can share it with you if you want

broken charm
#

The GitHub repo you are referring to for your addition

#

DAL values are likely a lookup table/array of sorts so I want to dig in the coming days to see what’s going on under the hood

tight oar
broken charm
#

Cool, thanks! I think I have an idea of how to approach it, I’ll fork it later this week and let you know if I can get the build working 🙂

tight oar
broken charm
#

I found how to add support lol, just had to do some digging

#

Maybe a week or so to get everything setup and testable

tight oar
#

You're a god!

#

Do you think that will allow the use of ports c/d?

broken charm
#

Yeah, it honestly shouldn’t be very hard at all, while I’m at it I’ll probably add support for samd54 chips

#

That’s a more long term goal but very doable

tight oar
#

Wow! they should give you something for your input 😛

#

I'll be waiting for it!

broken charm
#

Lol, sounds good!

#

I’ve got some IT type work to do tomorrow for family so I’ll just start working on it then

tight oar
#

Cool 🙂

#

Good luck!

prisma ferry
#

HEELP

#

where can i ask for help about pybadge?

#

i just got a pybadge lately, and am confused on a few points.

undone matrix
prisma ferry
#

um about the coding

undone matrix
half ibex
#

Hi Peepz
In my endeavors with micro:BIT I am trying to get SPI working with a strip of dotstars. I have it all connected and ready go. However I have no light in my dotstars yet.
My scope tells me the SPI clock is not stable - the square-wave signal is flickering on and off. When it is on, the waveform is stable, but only for half a second, then it disappears. This is my first project using SPI with MakeCode/microbit. So now I am a bit lost.
I am on a microbit v1.3B
My "on start" is shown below

#

In my "Forever" loop, I had put in "pause" calls between function calls to where I set a new color of my LEDs. That pause seem to be the cause of my issues with the flickering SPI clock.

round urchin
#

I have a Circuit Playground Bluefruit and I'm trying to use the mic to respond to sound. If I insert the "on load sound" block the program stop.

#

For example look at the following program:

#

The leds are suppose to blink alternating pink and yellow but they are not. If I remove the "on load sound block" the leds blink pink and yellow

slow rivet
#

If I understand it correctly, @round urchin, the forever block and the on loud sound block are mutually exclusive - you can only use one or the other. So if you want the LEDs to alternate when there is a loud sound, you need to put those elements inside the on loud sound block, and remove the forever block. I'm not very familiar with MakeCode though, so I'm guessing here.

round urchin
#

They should not to be exclusive. The "on load sound" is an event and it should be triggered while the forever keeps running. It's a cooperative multitasking

slow rivet
#

Ah ok. Then yeah, my unfamiliarity is showing. It was a guess.

round urchin
#

Anyway, if I tried to read the sound level without using an event the program stuck again

#

It looks like there is something wrong with the microphone implementation

slow rivet
#

Ah. Are you familiar with GitHub?

#

You could consider filing an issue on the GitHub repo for MakeCode is why I ask. I'm not sure how to otherwise report issues like that to the folks who can fix them.

round urchin
#

Not very familiar but I can try!

slow rivet
#

@round urchin I had to google "makecode github adafruit" to find the right repository on GitHub. I think it was pxt-adafruit or something like that. Click that link, click "Issues" and then click "New issue". Including screenshots and all the steps you tried, so others can reproduce the issue is a good idea!

round urchin
#

@slow rivet Thanks

quick kettle
undone matrix
quick kettle
#

thanks. I'm assuming the only real way to export/import old CPX projects to CPX BT is to copypaste the javascript?

#

also, I see that you can view/edit python code on maker.makecode.com. How does that compare to actually building it in circuitpython using Mu? Is it a different flavor of python?

#

actually, I guess I should ask that over at circuitpython

#

does it seem like the maker.makecode.com site is a bit flakier than the adafruit one? I've just been playing with it a little bit, and I've had to reload a few times to try to kick it into working again.

undone matrix
#

arcade.makecode.com is probably the most used site in the makecode domain, so the devs put their effort there, afaik

undone matrix
storm monolith
#

Is it possible to collaborate in real time with makecode?

quick kettle
#

thanks especially for the arcade tip. my son (9 yo) LOVES making/modifying games

#

of course, I imagine they'll be limited to none on the CPX

undone matrix
storm monolith
#

thanks

vapid thunder
#

Hi everybody, has anybody of you experience debugging MakeCode configurations? - The microphone of my "Circuit Playground Bluefruit" crashes any MakeCode script totally.

vapid thunder
# round urchin I have a Circuit Playground Bluefruit and I'm trying to use the mic to respond t...

I'm have filed an issue on github. Using the micro crashes "Circuit Playground Bluefruit": https://github.com/microsoft/pxt-maker/issues/331 - As it is the same NRF52xxx and PDM-Microphone, there should be a fix. But after 3 weeks of investigation, I haven't yet a fully debuggable environment. PXT/Codal is not really easy & intuitive to compile and debug. - What remains unclear is wether MakeCode support for CPb will improve or will stay "as it is" in the maker/community edition with bugs. @slow rivet is there somewhere a roadmap with the supported topics/boards and with end-of-life declarations? - btw: The Micro:bit v2 is an excellent alternative having added all sound in/out features + an dedicated bootloader / SWD IC. So I don't know if there is still a market for the CPb/CPX.

GitHub

Describe the bug Any sketch with "OnLoud" seams to crash the Cricuit Playground Bluefruit To Reproduce Steps to reproduce the behavior: Go to https://makecode.com/_Vc1dYMCDa7rP Lo...

slow rivet
vapid thunder
#

Thank you for the feedback

slow rivet
#

It's a valid question, but I don't know that anyone here will have an answer for you.

vapid thunder
#

I will continue to dig in the Stack: pxt/python/typescript/nodjs/codal/c++/yotta/thumb/NRFsdk is just a bit hard to digest as a starter. The issues are filed in as many repositories as reasonable, but I'm not sure who/how many are maintaining this topic - We will see.

slow rivet
# vapid thunder I will continue to dig in the Stack: pxt/python/typescript/nodjs/codal/c++/yotta...

In terms of the product, we're still selling it strong, so I don't see a reason not to improve it. But I don't maintain it, so that's a lot to say when it's not my project. I know more folks are using the Circuit Playground Express with MakeCode so that may have been a bigger focus. But the Bluefruit is a really nice board as well. Thank you for continuing to look into it and for filing issues on GitHub. That seems like the best way to go about it.

vapid thunder
#

Thanks for your judgement, CPB is a great product - my Kids like them and such solderless products are great to start.

celest gate
#

Hi! My robotics team is trying to create a prototype for their competition. We have the circuit playground express and a pulse sensor from pulsesensor.com. I am trying to understand how to program this in the makecode program, is it possible there of or do I need to use another?
I am a complete rookie when it comes to this!

valid meteor
# celest gate Hi! My robotics team is trying to create a prototype for their competition. We h...

I see some makecode examples on pulsesensor.com for the micro:bit. Circuit Playground Express won't be able to do their bargraph example but you should be able to find something else to indicate at least a reading. Looks like it's just 3.3v, ground, and a sensor wire, should clip to the CPE in a similar manner to what's indicated for the micro:bit example. I'd start by just turning the neopixels on and off with the heart beat reading and go from there.

celest gate
#

I followed the micro:bit setup, but I cant get the pulse sensor to do anything. Any ideas?

#

I coded it just like it was on the micro:bits, but I am not having any luck with any kind of input from the pulse sensor itself.

#

Any advice or help is greatly appreciated. We compete Saturday and were trying to have a functioning prototype with CPE

tidal smelt
celest gate
#

yes, give me just a few minuets

#

I have changed it so many times, I am scared to show what I have LOL

#

I am confused as to how the variable connects to the sensor....I know somewhere it needs to show pin A3 as the connecting point, but idk where

tidal smelt
#

Don't be scared! Is this all of it?

celest gate
#

I am probably way on the wrong track!

#

that's all I have so far 😦

tidal smelt
#

So what I can see is that Pulse never changes from 0, I think. I've only written a scoch of Scratch but it's similar to MakeCode

celest gate
#

I am trying to teach my team how to do it, but I am not having much luck myself.

tidal smelt
#

That sounds frustrating but I'm sure you can do it!

celest gate
#

I understand the basics, and I get get the internal sensors to work, but where this is an external sensor I am struggling

tidal smelt
celest gate
#

the lights come on and the siren goes off, but there doesn't seem to be anything happening with the pulse sensor

tidal smelt
#

hm

#

oh wait

#

120 is gonna be kinda low reading

#

since it goes from 0-1023

celest gate
#

I have the ground on gnd, the sensor is on A3, and the other is on 3.3v

tidal smelt
#

so let me show you how I changed your script, although it'll need more changes.

celest gate
#

Is there something else I need to do to make the variable that I created "pulse" to actually do something, I feel like I just named it but it doesnt do anything

tidal smelt
#

good intuition!

#

You needed to set pulse to analog read pin A3

#

Here's how I changed yours, but I circled areas that still need work

#

I'm not certain this is right but it should be closer

celest gate
#

Thank you so much for taking time to help me! I am going to try it and see what happens. It's frustrating because I can find help with using the pulse sensor from pulsesensor.com, but not for cpe 😫

tidal smelt
#

you'll probably get weird results because of the 120 and 95 parameters

celest gate
#

ok I will change that and see if that helps

tidal smelt
#

your analog read gives you a value between 0-1023 representing the voltage between 0-3.3 V

celest gate
#

i see

tidal smelt
#

so we'll have to figure out what number represents what beat per minute and scale appropriately

celest gate
#

I changed it to that, but it is not reacting to the pulse sensor and it is just staying blue

#

What I want it to do is this....I want it to light up red and play siren sound when the pulse is over 120, but it the pulse drops below 95 I want it to light up blue and the in between to stay green

tidal smelt
#

that makes sense

#

The issue with this is that we're gonna have to figure out what number between 0-1023 represents a pulse of 120, which will be hard to do without getting someone's pulse up to 120 or generating a fake pulse which we can't really do, I think

celest gate
#

I have the sensor connect to alligator clips with a jumper wire in between

#

I hope that is correct, or not a bad connection

tidal smelt
#

that should be ok

celest gate
#

ok cool

tidal smelt
#

So one issue is the sensor is just monitoring the light that passes thru the finger, not giving you a pulse out

#

like I assumed

celest gate
#

Yes, I watched that and tried to build it off of that. However, it has a graphing capability and I tried to get it to graph on here too, but I didn't have any luck

tidal smelt
#

yeah you won't be able to graph but you can still do the math

celest gate
#

ok

tidal smelt
#

does the project make sense?

celest gate
#

It makes sense, but I am confused because I can't use all of that code and some of it is over my head LOL

#

What I mean is some of the code they used doesn't work for CPE I don't think

#

are all of those red block from a variable? (I'm sorry that I sound like an idiot with this!)

tidal smelt
#

You sound like you're learning, not like an idiot.

celest gate
#

🙂

#

I'm trying!

tidal smelt
#

I think you can disregard the on Start Show String, forever show number, and forever serial out blocks

celest gate
#

ok

tidal smelt
#

I don't know if variables get initialized to 0 by default or not, but might put in on start time1 = 0

celest gate
#

ok

#

So are the red blocks variables?? 🙃

tidal smelt
#

yes? I think the coloring is different for some reason

celest gate
#

that is what was confusing me

#

ok working on it

#

I can't find the purple one that says running time 🤦‍♀️

tidal smelt
#

I think you're looking for millis (ms) in CONTROL under ADVANCED

celest gate
#

ok thanks

#

This is what I have, but when I download it doesn't do anything when I touch the pulse sensor?

valid meteor
#

You don't appear to have it trying to do anything in terms of output you can see. Simple case would be to add inside your if from Light, "set all pixels RED" and in your else if the same thing but GREEN.

celest gate
#

Ok, does it matter where in the if and else if that I put it?

valid meteor
#

I don't think so.

celest gate
#

Something like this?

valid meteor
#

Yep

celest gate
#

ok, I tried and still nothing

#

wait hold on i made a mistake let me try again

#

well, nevermind still nothing

valid meteor
#

Is your sensor lighting up?

celest gate
#

I would be happy at this point if I could just get the thing to read my pulse and make the lights blink with the pulse.

#

Yes it is green

#

I have black connected to ground, red connected to 3.3v, and purple connected to A3

valid meteor
#

You might have to simplify your code, just to get an idea of what the output from the sensor is. Do a simple if and set the threshold low, like 100, with a set pixles to a color and see if you can get them to come on. Raise the number over a couple trys and see if you can find the upper threshold. Easier to do with serial output but that's probably next level and appears to be beta for the CPE.

celest gate
#

Ok, do I use the variables in there or another way?

#

I'm sorry, I am trying to learn 😦

tidal smelt
#

you do use the variables in there, and no need to apologize

celest gate
#

Like take all of this out?

tidal smelt
#

Something like this

#

then you'll want to increase the threshold by 50 or 100 until you get a good idea of the upper threshhold

celest gate
#

ok, thank you!!!! I will ry

#

try

#

Ok, when I change the values it either just stays red or green from the beginning without touching the sensor

tidal smelt
#

what happens when you touch the sensor?

celest gate
#

nothing

tidal smelt
#

hm this would be easier witha serial console

celest gate
#

I thought circuit playground would be easier for my team to understand, but apparently not! lol

#

because their robotics coding is in block coding, so I thought maybe it was similar, but I guess not. It's okay though maybe the kids can get it to work enough to change colors when the switch is moved from left to right just to show what their prototype is supposed to do

tidal smelt
#

what values for if pulse > have you tried?

celest gate
#

I will try

#

same thing

tidal smelt
#

sorry I meant did you try if pulse > 100? 200? 300?

celest gate
#

yes i went all the way up

tidal smelt
#

Hm

celest gate
#

I appreciate all of your help with this! I think I am just going to let it go and get it to light up and sound an alarm to light up red and then alarm and light up blue when the switch is flipped to show the judges what it would do. I do know how to teach the kids to do that part! hahah

tidal smelt
#

ok! Good luck at the competition

celest gate
#

Thank you so so much!!! 🙂

#

If anyone comes up with any other ideas, let me know!! 🙂

valid meteor
#

I seem to recall having some timing issues playing with analog readings and makecode. Part of why I switched to Circuit Python. Also not having serial out makes it kind of hard.

#

You could try adding a wait inside your IF but after it sets the ring red. Maybe 500ms or 1000ms. I'm wondering if the switching colors could be happening too fast for you to see. With a wait, the whole thing will stop if you break that threshold and let you see that something is happening at least. If it just stays red, then start adding 50 or 100 at a time to your threshold.

#

I would try it by keeping the part that takes the reading pointed up into the air so it's not getting reflection off the table. If you can get it to turn green, then stick your finger on it and see if it goes red at that point.

tidal smelt
#

@celest gate good stuff here 🙂

celest gate
#

Trying that!!

tidal smelt
#

+1 for circuitpython as well, although may be too much of a jump for your students

celest gate
#

It is still just staying on that one color 😫

valid meteor
#

Green or red?

celest gate
#

I have it set to pulse < 150 and it stays green

#

if i say pulse < 200 it stays red

#

nothing happens when I touch the sensor

tidal smelt
#

dumb question, but you're touching the right side of the sensor right? I've made mistakes like that before so just checking

valid meteor
#

< less than or > greater than?

celest gate
#

well i have tried both ways, just trying everything

#

yes, I checked to make sure it was the right side 🙂

valid meteor
#

Try > 500 and maybe do it in a dark room, see what color you get

celest gate
#

ok

valid meteor
#

If it's green, then touch it and see if it changes.

#

If it's already red, raise it in steps of 100 and see if you can get it to be green.

celest gate
#

at 500 it was red.....at 600 it was green and I turned the lights off and still no change

valid meteor
#

You want it to be green without touching it, and then see if it goes red when you touch it.

#

Assuming your code looks like what @tidal smelt posted above.

celest gate
#

yes it does

#

and still no change from green when touching the sensor

tidal smelt
#

2 us may be too fast for you to tell

celest gate
#

i tried 5 too

valid meteor
#

🙂 Can you change that to ms? Otherwise try 1,000,000

celest gate
#

hahaha

#

yes

tidal smelt
#

yeah a microsecond is a millionth of a second 🙂

#

so while 5 is much longer it is still gonna be hard to see

celest gate
#

hahaha oops!!

#

ok stupid question, how do I change it? I don't see another wait block

tidal smelt
#

I don't think you can

#

I don't see one either, you have to just wait for lots of microseconds

#

500000 or 1000000 should do the trick

celest gate
#

ok thanks

#

still no change 😦

#

staying green the whole time my finger is on it

#

I had my friend try hers too lol I thought maybe my fingers were not working lol

tidal smelt
#

hmm

#

that's odd

celest gate
#

Could I have done something wrong with the variable? Like is there something I should have done to make it know that the sensor is there?

tidal smelt
#

No your variable assignment looks fine, it's just an Analog Read

celest gate
#

ok

tidal smelt
#

I'm starting to wonder if the sensor is defective, let me look at the site again to make sure it's wired correctly

celest gate
#

and it is set to A3 which is where it is plugged into

tidal smelt
#

how much wire is exposed from the sensor?

#

and are those female to male jumpers?

#

do you have purple ->green alligator clip there?

celest gate
#

hangon getting pics

#

male to female alligator clip

tidal smelt
#

ok that looks right

#

assuming the purple is plugged into the green 🙂

celest gate
#

yes! 🙂

#

I just unplugged to show you 🙂

tidal smelt
#

I figured 🙂 I didn't realize there were male jumpers coming from the sensor, my eyes are bad

#

Hmm I'm really not sure what the issue is here

celest gate
#

Maybe it is a bad sensor, it seems like it should be responding to something we have tried

tidal smelt
#

yeah hmm

#

I'm not sure whether you can run circuitpython and makecode at the same time but we could try something in CP to see if it is outputting any values

celest gate
#

ok, if you don't mind. I don't want to take up all of your time!

valid meteor
#

I'll get on from home here in a bit. What OS do you have available on a PC/Mac/RPi? Might see if we can get some serial out going if you have the time.

celest gate
#

PC

tidal smelt
#

and I don't mind 🙂 happy to help some kiddos with their competition (i assume kiddos)

celest gate
#

yes 6-8th grade

tidal smelt
#

between the 3 of us I'm sure we can find something

celest gate
#

they are competing in the state robotics tournament this weekend. They created their first prototype with little bits, but they are too bulky so they wanted to improve it

#

I am trying to scramble to help them with what they want to do

#

They were chosen in the top 20 teams in the world last year for the Global Innovations Competition!! Awesome kiddos!!!

tidal smelt
#

wow!

valid meteor
#

Are you familiar with any terminal software, putty or SecureCRT for example

tidal smelt
#

I was going to suggest mu for a beginner but PuTTY is really a better option

celest gate
#

I am not familiar, but I can be haha

valid meteor
#

Hmm, mu might make the connection automatically? At least it does when I'm using it for CPy

tidal smelt
#

it does ime

celest gate
#

I have Mu downloaded, I was playing in that last night

#

not that I knew what I was doing hahah

valid meteor
celest gate
#

Yes

valid meteor
#

Look in advanced, click extensions, type serial in the search box and add the serial uart extension

celest gate
#

ok

#

done

valid meteor
#

That will let you add a serial write number block, pull your variable PulseDet into the number field

#

If mu can auto detect your board when you plug it in, then if you click the serial thing at the top it should show you that value

celest gate
#

It's saying it can't find the board

valid meteor
#

I've not used mu with anything but Circuit Python so I'm not sure there. I'll be off for a few minutes while I head home. Will check in again in a bit.

celest gate
#

ok, I am going to head home too. Will you all be around in about 30 mins?

tidal smelt
#

we can get you set up with Putty for serial comms

celest gate
#

I can download whatever might work

#

still at school 🤦‍♀️

tidal smelt
#

just ping me when you get back 🙂

celest gate
#

ok, give me 30 mins and I will be back

valid meteor
#

I've only done makecode serial on the micro:bit so I suppose it could be different.

celest gate
#

Ok, I am back!

#

So do I just search Putty to download it?

valid meteor
#

Based on my limited experience doing this, we need to find the com port that your board is using. Yes, putty should be an easy download.

celest gate
valid meteor
celest gate
#

When I plugged it into the Arduino IDE it showed COM 6

tidal smelt
#

Windows is weird com can change

celest gate
#

ok, so putty configuration page???

#

Yall will have to walk me though this

tidal smelt
#

no worries one second

#

to find your COM port, you want to open the device manager

valid meteor
#

I'm on linux so going from memory, you need to open your control panel->device manager->??? look for USB stuff

#

I can grab my work laptop if you can't find it and walk you through it

tidal smelt
#

there should be devices under there

#

you can do windows Key + "Device Manager" to find it

celest gate
#

ok looking

#

ok its com 6

tidal smelt
#

cool so what happens when you put in COM6 to putty and click Open

celest gate
valid meteor
#

Were you able to add the serial write to your make code?

celest gate
#

Like this?

valid meteor
#

Do that but put it in a forever block preceded by your analog read

celest gate
#

ok

valid meteor
#

Siting down to dinner, will check back in a bit

celest gate
#

Like this?

#

np

tidal smelt
#

try that

#

and see if anything shows up in putty

celest gate
#

so download just that from make code?

tidal smelt
#

yup!

celest gate
#

ok

#

says error reading from serial device

tidal smelt
#

in putty?

celest gate
#

yes

tidal smelt
#

hm

#

I wonder if we have to have the usb adapter for makecode

celest gate
#

I'm not sure

tidal smelt
#

the good news is we can do this in CircuitPython

celest gate
#

ok cool

tidal smelt
#

if you're up for it, let me write up the code real quick

celest gate
#

is that something I need to download

tidal smelt
#

there is a download yeah, and it will overwrite makecode on your board, so when you want to go back to makecode you will have to reinstall it

celest gate
#

ok

#

can you give me link to download so I am on the right thing? pleaseee

tidal smelt
celest gate
#

ok when I download it want to open weird. Is there something special I need to do

tidal smelt
#

No need to open it

#

we'll be dragging it onto the CPX

celest gate
#

oh ok

tidal smelt
#

you'll want to follow the instructions on that page to install CP

#

then this code should work

import board
import time
from analogio import AnalogIn


pulse_pin = AnalogIn(board.A3)


while True:

    print(pulse_pin.value)
    time.sleep(0.01)
celest gate
#

so copy that into mu?

tidal smelt
#

yeah and save the file as code.py

#

python is sensitive to whitespace so make sure the spacing doesn't get messed up 🙂

celest gate
#

ok

#

like this?

tidal smelt
#

yeah that should work just fine

celest gate
tidal smelt
#

ok so did you install circuitpython?

celest gate
#

yes and I followed directions....now instead of the drive saying PLAYBOOT it says CIRCUITPY

tidal smelt
#

perfect!

celest gate
#

ok!

tidal smelt
#

so we want to drag the code.py onto circuitpy

celest gate
#

ok

#

ok I did that

tidal smelt
#

ok so putty should now be printing numbers

#

oh actually it may have disconnected

#

if it did, you'll have to restart putty and connect again

celest gate
#

it says unable to open connection...unable to open serial port

tidal smelt
#

hmm COM port may have changed

#

windows is funky that way

celest gate
#

yep now its COM 12 lol

tidal smelt
#

haha

celest gate
#

yes its running lots of numbers

tidal smelt
#

FYI here's the source for getting makecode back

#

are they roughly static? or all over the place?

celest gate
#

yes like 12540, etc

tidal smelt
#

ok what if you put your finger on the pulse sensor?

#

I think I know why our makecode wasn't working

celest gate
#

its doing the same thing when I do that

tidal smelt
#

I was wrong about the range, it's 0-65535 not 0-1023 so it was almost always over the threshold

#

FYI here's the info for getting makecode back

celest gate
#

ok thanks1

tidal smelt
#

Also there is a way to plot with Mu, let me find it, we can see whether a pulse is coming thru

celest gate
#

ok

#

when I put my finger over it, the 3rd number seems to change a little

tidal smelt
#

what happens if you: close putty, then click serial in mu?

valid meteor
#

Put your write in () with a comma after it to make it plot

tidal smelt
#

in putty?

valid meteor
#

in cpy

tidal smelt
#

I didn't know that, good to know!

celest gate
#

in mu it's running the same numbers

valid meteor
#

print((pulse_pin.value,))

#

the plotter needs a tuple

tidal smelt
#

ahhh

valid meteor
#

Just figured that out a couple days ago

celest gate
#

ok now the numbers running have () around them and a comma

tidal smelt
#

ok there should be a plotter button

celest gate
#

ok, clicked it

tidal smelt
#

anything showing up?

celest gate
#

sayd data flood

tidal smelt
#

ah ok

#

change to time.sleep(.05)

#

if that doesn't work use time.sleep(0.1)

celest gate
#

ok plotter is open now

tidal smelt
#

now we can see if the sensor is working with your finger on it!

#

progress!

celest gate
#

it doesn't change....flat line ( I think I may not have a pulse LOL)

tidal smelt
#

hrm

#

I am starting to think there's something wrong with the sensor let me read about it a bit

celest gate
tidal smelt
#

I'm frustrated on your behalf 😦

celest gate
#

could the value on the plotting graph be too distanced apart to read?

tidal smelt
#

I doubt it it looks like a solid line, it should scale automatically to fit the plot

celest gate
#

oh ok

tidal smelt
#

Hmm only thing I can think of is that the sensor is busted, but someone else likely knows more than me

valid meteor
celest gate
#

ok weird, when i unplugged the male to female part on the purple wire it started plotting

tidal smelt
#

what's it look like?

celest gate
tidal smelt
#

ok that's probably floating. What happens if you put your finger on it

celest gate
#

doesnt seem to do anything

#

it is making its own plot

tidal smelt
#

oh duh I don't know why I asked you to test an unplugged sensor >.>

celest gate
#

if i shake it or move it fast it plots up and down

tidal smelt
#

is it plugged in right now?

celest gate
#

no

tidal smelt
#

ok it's just random behavior, it's not communicating with the CPX

#

oof these are 24.99 I hope I'm wrong that it's not working

celest gate
tidal smelt
#

yeah that happens because the pin A3 is "floating", not at any defined voltage

celest gate
#

plug it back in and it is a flat line

#

i swaped alligator clips to see if that helped and I tried a new CPE

tidal smelt
#

I think that narrows it down to the sensor

celest gate
#

ok, lets say it were working

tidal smelt
#

I realize your competition is in two days but you might see if they offer any support

celest gate
#

How would I write the code in CP to show up red if the pulse was over 150 and show up blue if the pulse was under 95

tidal smelt
#

hmm let me write that up real quick

#

It could be buggy but there is JS code online I can steal from

celest gate
#

oh ok cool

#

at least I can show them the code and explain how it would work in case they want to share that in the competition

#

for their next steps

#

FYI, their innovative project problem is to help people become more actively safely...especially in the snow bc many heart attacks occur when shoveling snow and frostbite and hypothermia can happen when playing in the snow or participating in snow sports, etc...their idea is to create a snow glove that tracks heart rate, pulse ox, temperature, and gps and will alert with a light or alarm when the heart rate reaches a dangerous level

#

or body temperature or oxygen level.....they just wanted to get the pulse sensor working to show a part of it actually functioning, if that makes sense

tidal smelt
#

that's really cool!

celest gate
#

They have worked hard for sure, and all while being 100% virtual. They were grand champions at their regional tournament, hoping for state champs too!!

tidal smelt
#

wow I hadn't even considered how tough this would be with quarantine

celest gate
#

It has been a CHALLENGE to say the least!!

#

But they are rockstars and have persevered!

tidal smelt
#

that's great!

#

So you want red if > 120? what else?

celest gate
#

blue if under 65 sorry I didn't mean to say 95 earlier

tidal smelt
#

ok cool

#

if it's in between?

celest gate
#

it can be green

tidal smelt
#

hotay! We're almost there

celest gate
#

You are the best!!

#

This way I can give it to them and explain it and they can decide if they want to share that as their next steps. I think the will. Several have been steadily watching youtube videos and trying to learn this as much as possible, but we just haven't had any luck with this sensor

tidal smelt
#

this could probably be written more slickly but it should be easy enough to understand

import board
import time
from analogio import AnalogIn
from adafruit_circuitplayground import cp




pulse_pin = AnalogIn(board.A3)


flag = False


while True:

    if pulse_pin.value > 55733 and not flag:
        flag = True
        time2 = time.monotonic
        delta_time = time2 - time1 
        time1 = time2 #move time up

        pulse_val = =(60 - 60 % delta_time) / delta_time # approximate the pulse

    else if pulse_pin.value < 27546 and flag:
        flag = False        

    if pulse_val => 120:
        print("that's a fast heart rate")
        cp.pixels.fill((255,0,0)) #red full brightness
    elif pulse val <= 65:
        cp.pixels.flill((0,0,255)) #blue full brightness
        print("that's too slow")
    else:
        cp.pixels.fill((0,255,0)) # green full brightness

#

the numbers 55733 and 27456 are the numbers from the project online (which you should probably cite as a source) scaled to 65535 instead of 1023

celest gate
#

That is perfect, I can follow it and help them understand how to read it

#

can you give me the link so they can add it to their sources?

tidal smelt
#

yeah sure thing

celest gate
#

ok, great!!! I appreciate you more than you will ever know!!! I joined this discord on a whim just looking for guidance and you guys have been more than helpful!

tidal smelt
#

This community has helped me more than I helped you so I'm just starting to pay them back 😛

valid meteor
#

Sorry I couldn't be more help, Lews is the real hero

celest gate
#

We will go over this website tomorrow, along with CP and everything else so that they get a better understanding of it

tidal smelt
#

we would have been stuck plotting for an hour if you hadn't come along with the tuple help

celest gate
#

No, you both were amazing!! I am very thankful for you all!!

tidal smelt
#

I completely missed that in the guide

celest gate
#

I have learned lots!!

tidal smelt
#

adafruit learn guides are a great help if you're ever stuck

celest gate
#

I know FLL robotics programming like the back of my hand, but this is quite different!! lol

tidal smelt
#

that sounds fun!

celest gate
#

It is amazing!!

#

They scored a 425, right now the state high is 405, so we are hopeful!! They rocked it in robot this season too!

tidal smelt
#

super impressive!

celest gate
#

Thank you both again for everything!! 🙂

#

I will let you know how they do!

tidal smelt
#

please do

celest gate
#

Take care and have a great night!

valid meteor
#

Great, good luck!

celest gate
#

Thank you!

celest gate
#

Hey guys!!!! Just wanted to give you all an update on the robotics tournament!!! Absolute Zero won 1st Place State Grand Champion, 3rd place in robot game and the nomination for Global Innovations Award!!! Thank you so much for all of your help!!! 🙂

#

@tidal smelt @valid meteor

bleak igloo
#

That's awesome @celest gate!!! Congrats to the team with all the work and effort put into it!

celest gate
#

❤️

valid meteor
tidal smelt
#

That's so cool! Congrats

brisk canyon
brisk canyon
# brisk canyon Naive question: What are the “networking libraries” the deprecation warning is r...

I answered my own question with git blame, but the documentation could be more obvious that it means the Wiznet5k and ESP32SPI libraries https://github.com/adafruit/circuitpython/commit/610e0171aac69f7cd7b7c46eb776a3624ce224a3

GitHub

We're moving towards a co-processor model and a Wiznet library is
already available.

New native APIs will replace these for chips with networking like the
ESP32S2 but they won't be these.

willow tulip
#

Makecode on a CPX can only run two micro-servos, even though the hardware could do 4, in theory, seemingly right?

#

if I want four, i'd need to slap on a Cricket.

potent grove
#

This the Microsoft make code?

undone matrix
#

Yes

snow forge
#

Does anyone use Makecode Arcade with high school students? I'm trying to figure out if i want to take a game design teaching job in high school where they want to redo the curriculum game design 1 with blocks and game design 2 javascript

neon kiln
#

Hello friends, can someone help me with my created .UF2 from maker.makercode? When i copy it in my Gemma M0, he doesnt start up. In the Simulator worked it fine 😦 its only a simply blink code for my neopixel 😦

undone matrix
#

Did you select the right board? I really only have experience in MakeCode Arcade so that's about as much information I can give 😅 but there is also a Discourse forum for MakeCode at https://forum.makecode.com

neon kiln
proven coral
tight oar
#

Hello! This is a very specific question but I would really appreciate any help or advice: I want to work with the temp sensor "DS18B20" in MakeCode Maker. I found an extension (https://github.com/DFRobot/pxt-ds18b20) but only works for MakeCode Microbit. Does anyone know how can I make it work in MakeCode Maker? Thank you!

thorn apex
#

What’s the best way to send information between 2 CPXs without using IR? The IR sensors are facing away from each other. I just need to send something that can be read to trigger different light patterns on the other CPX. Any help is really appreciated. I’m trying to get them in sync for a cosplay.

undone matrix
#

Could you just connect a wire between 2 digital pins on the CPXs? One of the CPX would pull the digital pin high and the other CPX would watch that pin for the level change?

thorn apex
#

Hmmm

#

That could work

glad berry
#

@thorn apex @undone matrix nicely done! You may also be able to do this via serial by connecting TX/RX on one to RX/TX on the other.

undone matrix
#

Ah yes that's true - if you have much more complicated information to send (sensor values, etc.) then serial would be better for 2 CPXs
If you just want to tell another CPX to light up and that's it basically then just pulling a digital pin low would be simpler.

thorn apex
thorn apex
#

Whats the NeoTrinkey’s Makecode support status?

astral kraken
#

Hello, my name is Ariana and I need help with the make code arcade and downloading games to the raspberry pi 0

I downloaded the firmware from ada fruit for the arcade firmware, but my games that I create won’t show up on the menu

snow island
astral kraken
#

Thank you!

eternal tide
#

Hello, are there instructions how to port Circuitpython to a new chip (ARM cortex M3 derivative)?

undone matrix
chrome tiger
#

Probably a stupid question, Anyone have a good location for docs for makecode classes? I am looking for how to change the speed of different pixel animations, but can't find what variables / parameters are available

#

for CPX

tight oar
#

I am using the loadBMP and drawBMP functions of the Adafruit_ImageReader library to load bitmap files of images from an sd card. As far as I can see, they only accept literal strings as file names, whereas I want to use string variables as there are different files to be loaded. Can anyone help?

dapper garnet
#

yourString.c_str() probably

tight oar
tight oar
# dapper garnet `yourString.c_str()` probably

To be more specific, this is the line of code that correctly loaded the file image.bmp: reader.drawBMP("/image.bmp", tft, 0, 0); and I tried these two lines instead: char string="/image.bmp"; reader.drawBMP(string, tft, 0, 0); unsuccessfully. How to correct them?

undone matrix
#

May want to ask in #help-with-arduino as this is for MakeCode 🙂
But I believe:

char string = "/image.bmp";

should be:

char* my_string = "/image.bmp";
  1. The * indicates a pointer - so it knows it's a array of chars. You could also do this: char my_string[] = "/image.bmp";
  2. Probably don't want to name your variables after built-ins 🙂
tight oar
keen bone
#

Hello everyone, I have my under cabinets mounted neopixels running off of a cpx w a signal shifter. I want to replace the cpx w a qt py and add a light sensor that will dim the lights when the kitchen lights are off. I wrote the code in makecode and was wondering if I could code the qt py there as well. I'm guessing I would need to add the light board and not just use the default cpx one

undone matrix
#

The QTpy does not seem to be supported (yet) in maker.makecode.com - gonna have to use CircuitPython or Arduino probably

keen bone
#

Yeah got it going in Arduino, there are some really helpful sketches.

keen bone
#

I have the SAMD py btw which can run my cpx makecode

arctic zealot
#

Hi there! It seems there was a brief thread in 2018 about supporting bluetooth on the maker.makecode platform. I'm wondering if this is possible on any of the bluefruit boards? If not, can it be developed/ is it possible?

undone matrix
#

I think there is a thread on the MakeCode forums about it - tl;dr: there isn't any support currently

#
arctic zealot
#

👍 Thanks @undone matrix . Yup I saw that thread but haven't seen anything else around. I'm wondering if there is a technical reason other than available development time/ interest why this is not possible? I do not come from an engineering background so not sure of the hardware limitations.

snow island
#

@arctic zealot I think it's development time. CircuitPython uses the same hardware and can do bluetooth

arctic zealot
#

Thanks for the info @snow island ! I know the Microbit side has a pretty robust Bluetooth extension. I wonder how much development time it would take to convert for Adafruit boards? Hmmm now to find someone that can help 🔍

orchid sapphire
#

Are there any examples for using MakeCode with the Trellis M4? The docs say it's possible and I found a short video clip of using it, but I'd like some docs on setting it up or at least some example code to look at.

orchid sapphire
#

I can get it to run and copy it. I can also create a new project and choose trellism4 which will create a new project with the MatrixKeypad extension.

#

However, it doesn't have the music blocks, the original template did.

#

I was able to manually edit the project JSON settings to add mixer, mirroring the template, but I can't find a way to save these settings.

#

It looks like it's been in beta for a long time. Is there a way I could contribute to get the NeoTrellis M4 out of beta (I'm a software dev by day)

stone stratus
#

I am using a Gemma M0 and have the stemma speaker. Can I program something using these in make code?

wanton portal
#

Looks like you can using the a0 analog out. BUT it would be very basic as far as I can tell. There is a music framework and some sound effects, but it’s not instruments playing polyphonically or samples. I’d love to be wrong about that!

left ether
#

In addition, the 10bit Dac isn’t exactly built to handle wav files, so don’t get your hopes up.

jagged zephyr
#

How do I get the "crickit for circuit playground express" options to be visible on Make code? I clicked on the plus next to extensions and selected crickit, but do not see crickit specific options

wanton portal
#

Hmmm it shows up for me as a rectangle a few higher than the ADVANCED drop down. Maybe an update broke it? How does it look in another browser?

jagged zephyr
#

@wanton portal - I tried on chrome and microsoft edge browsers. Same behavior

wanton portal
#

I have updates on my mind because supposedly the Crickit is updated to allow pull-ups on the I/O pins but I’m not seeing it.

jagged zephyr
#

@wanton portal - When I am working with makecode, should it matter whether my crickit is updated? Is make code independent of the hardware and should work even when your usb is not connected to your boards? I will still try to update my crickit to see what happens

#

@wanton portal - Thanks for the suggestions. I updated my crickit. The issue with make code still persists

wanton portal
jagged zephyr
#

@wanton portal - Thanks for confirming. I checked with Servos, data logger and keyboard extensions and they all worked for me as well. I guess the issue is with crickit. Adafruit has mentioned this is still in beta. Guess there are issues needing to be addressed.

wanton portal
jagged zephyr
#

Can we communicate with i2c devices from Circuit Playground Express with Makecode? I have a Stemma interface OLED and wondering whether I can communicate through MakeCode or do I have to use CircuitPython

jagged zephyr
#

How can I know the code received via infrared on the circuit playground express, when particular keys are expressed? I am using Make Code, not circuit python

#

This is the code I am using

#

When I download to my Circuit Playground Express and click and key on my remote, nothing is happening. How can I debug?

wanton portal
#

@jagged zephyr Step one: grab another remote and see if you can see output from both using a phone or other camera (they usually can see IR to some degree)

#

Step two: does other remote get detected by your board?

wanton portal
buoyant tapir
#

What software do y’all use?

wanton portal
#

Also (apropos of every viewing solving a problem extending makecode past simple projects): the Derek Banas “Learn Makecode in One Video” YouTube tutorial is quite good if a bit of a firehose.

jagged marsh
#

Hi, I'm exploring MakeCode using maker.makecode.com, because I might like to use it to teach Neopixel coding to a group of non-programmers. I'm not able to see the toggle that's supposed to switch between Block Code/JavaScript in the editor(screenshot of my editor window below). I've tried switching between different boards and using both Chrome and Edge browsers. Any help is greatly appreciated.

wanton portal
#

Looks the same on Safari. The Adafruit editor still has the block code / JavaScript switch but it seems to work with Circuit Playground Express only, not Playground Bluefruit like you have there. On the CPB learn guide it points to the site you referenced, but on the product page it states, “It does not support MakeCode at this time (there is no ETA when it might be added)”. Things seem to work best with the non-Bluetooth CPX.

jagged marsh
jagged marsh
#

Hi Again. I have a new issue, that I hope someone can help with. I'm finding that the MakeCode NeoPixel library is not compatible with these particular fixed-address LEDs: https://www.adafruit.com/product/4917. I have a simple MakeCode program (https://makecode.com/_he8aqX3KA04r) that runs a standard SK6812 LED strip just fine, but will not display at all on the fixed-address LED string. I am running the program on a CircuitPlayground Express, and level-shifting the data signal to 5V before it enters the string. I can successfully use CircutPython code to get the same CPX to control the fixed-address LED string but nothing I have tried has gotten the string to display using MakeCode. I strongly suspect that the problem lies the NeoPixel or WS2812b MakeCode library as I experience the exact same issue trying to control the string with a micro:bit using MakeCode for micro:bit. I'm happy to post video showing the problem if that will be helpful. Thanks!

native narwhal
#

hi there, I created a void who spam a key, it's possible to creat a buffer for this void ?

stone stratus
#

Hello, This code is working fine in the browser, but when I download to the Gemma, it is only ever displaying the first condition (red) and thats it

halcyon vale
#

my guess is on_start is not looping on the hardware?

#

I should stop guessing stuff this late at night, bad random number generator?

keen pelican
#

@stone stratus is it possible to see the generated code? would make it easy to spot the issue i would imagine

shadow atlas
vale horizon
#

Has anyone seen where Pick Random would always yield the same value the first time called, running on CPX, but not the simulator? I didn’t see where seeding the RNG would be needed.

vale horizon
#

On the sim, the number varies. On the CPX, it’s always 0. Is this a bug? Can we work around it? Math.randomseed appears to be unsupported.

vale horizon
#

Where else might we go for help, if there's no answer here?

undone matrix
vale hull
#

Hello! Long time lurker, first time poster. I'm building an installation that requires a Neopixel strip that I'm running using MakeCode on a Circuit Playground Express.

I've been working with an 30 RGBW strip, liked what I was making and decided to upgrade to 60 LED RGBW neopixel strip. I ordered one 60 LED RGBW neopixel strip at 5 meters in length, and another 30 LEDG RGBW neopixel strip in 0.5 meter with alligator clips.

When I run a simple strip test on the 0.5 meter 30 LED RGBW strip, the colors are as expected. When I run the same code on the 5 meter strip (only programming pixels 0-30), the results are totally different. I've tried addressing each LED individually in MakCode but I'm still getting weird colors; a "red" pixel turns yellow or white instead, and I can't seem to get all pixels to be uniform color on the 5 meter strip. Going back to trouble shoot on the 0.5 meter strip, and the colors appear as expected.

Setup: Neopixel is wired to the CircuitPlayground Express which is connected to my laptop using the microUSB to USB2.0 port. My computer is a Dell XPS13 from 2019 and powered from the wall outlet.

Photos and code attached. This is my first time posting on any forum ever, and any help is appreciated!

wanton portal
#

Wow that is baffling. Two things come to mind: 1) sometimes same-looking strips have different chips or LED orientations. I would take a really close look at the neopixels with a magnifier and compare. 2) power issues are endemic with neopixels, often the 1 mA idle current of “off” neopixels causing problems. I would try to reproduce the problem with the 30 LED strip by setting lots of LEDs quite bright to see if it shows up. Your other one has 10X the LEDs? Might need external power or just bypassing the CPE regulator to get the max from your computer port.

shadow atlas
vale hull
vale hull
vale hull
shadow atlas
#

It is weird the 0.5m works. Try setting the pixel order

vale hull
#

ooo lemme try that in just a sec!!

vale hull
# shadow atlas It is weird the 0.5m works. Try setting the pixel order

THAT WORKED!! Thank you so much!! I have the CPX connected the 5 meter RGBW strip, and powered through my laptop, and every pixel is colored perfectly. I still went ahead and bought the level shifter and a 10v power cable because I'm sure running a 5 meter strip on a 3v battery pack and the CPX alone won't cut it.

thank you!!!

shadow atlas
#

Do you mean 10A as in amps 10V is too high for 5V strip

vale hull
light stump
#

good afternoon 🙂 I really need help. I would like to change color on Adafruit 5x4 Neokey. But, I need to change color of specific Key by pressing it. For example: Color white, after pressing, color green. Pressing again will go back to white.

#

I need this for every key of the 20 I got in my Matrix.

#

Is this possible?

#

I am using Arduino micro controller

shadow atlas
#

Yeah sounds like a pretty simple bit of code

dense escarp
#

MakeCode LED Matrix Pixel mapping Help Needed......

Hello

I hvae just purchased a 16x16 WS2812b matrix.

The problem i am having is that the matrix is "ZigZag" in that the columns alternate in direction ( hope i have explained that well enough?)

i am trying to get me head around how to work out how to translate the physical order of the pixels into a x,y coordinate system .

The Arduino library takes care of that for you but i am hoping to setup a project using Makecode , initially on a BBC Micro:Bit,

Would anyone be kind enough to point me in the direction of any help / extensions / formulae as my already bald patch is growing larger by the minute!!

Regards

j

leaden creek
#

so I am trying to work out why somethings are not playing as expected, I have something set to right and left side switch that seem to play okay , but the button press seems not to

#

shake is and light are also iffy, but I am not likely to keep using shake so Im not to worried about that.

#

it seems that the sparkle animation makes one pass around the CPX and it then it gose back to what it was playing before, I expected about 6s before it went back

#

also shake is not going to work for what I need because i dont run that hard, so it can be safely ignored for the time being, while I try to work out what I have done wrong

wanton portal
# dense escarp MakeCode LED Matrix Pixel mapping Help Needed...... Hello I hvae just purchas...

I think you could use an array of LED order and then iterate through the array and turn that one on. If you had a 3x3 array you’d set array as 123654789. if you wanted to turn on an LED you’d look up the position value for the array and turn that on. You will have to make an array of size 256, which is not going to be fun, so maybe something along the lines of: if (LED# modulo 32) is >16 then LED# = LED# + (adjustment array) that is a lot tidier, but likely needs a bit of trial and adjustment

leaden creek
dense escarp
leaden creek
#

okay, so I was wrong about the switch working, I have done something very wrong, but I am not sure what to look at.

#

I striped down to this to try and puzzle things out, but it's just stuck on the left side seemingly

dense escarp
# wanton portal I think you could use an array of LED order and then iterate through the array a...

After a lot more head scratching trying to code this , I found an extension for Makecode that does pretty much what I wanted -

https://github.com/Shorts1999/pxt-smartmatrix

Don't know how missed it but am now able to do X,y coordinates on my 16x16 matrix ....

https://youtu.be/S9wSHZsnY-g

Thanks for your help ...I probably would have put this problem in a drawer until much later without it ...

GitHub

Makecode extension for ws2812b matrices. Contribute to Shorts1999/pxt-smartmatrix development by creating an account on GitHub.

Slightly adapted from the original work of both...

Michael Klein - https://www.hackster.io/MKlein/callimatrix-8x8-d15f1c

Thorsten Kimmeskamp - https://www.hackster.io/thorsten-kimmeskamp/lissajous-kurven-auf-dem-calliope-mini-c7ff4a

16*16 WS2812b Led matrix display connected to BBC Micro:Bit

Programmed in Microsoft MakeCode - https://make...

▶ Play video
wanton portal
leaden creek
#

So I keep trying to dig in and work out what I'm doing wrong but, I'm running in to issues still, it seems like my logic and input is just ignored, am I missing a steep?

#

Even with the if true then x lose block and built in animation on each side it just seems to stick to one side

#

Do I need to add something in order for that to work?

gilded bluff
#

Anybody use PlatformIO under VS code? I'm having problems compiling an imported Arduino sketch.

#
compilation terminated.
In file included from .pio/libdeps/wemos_d1_mini32/Adafruit GFX Library/Adafruit_GrayOLED.h:30:0,
                 from .pio/libdeps/wemos_d1_mini32/Adafruit GFX Library/Adafruit_GrayOLED.cpp:20:
.pio/libdeps/wemos_d1_mini32/Adafruit BusIO/Adafruit_I2CDevice.h:5:18: fatal error: Wire.h: No such file or directory
#

I can't find a library in PlatformIO called Wire

#

There is a file ~/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h but it doesn't seem to be picking that up

#

OK, I found it in the Built-In tab on the PlatformIO Libraries page. I had toadd it to platformio.ini manually, as there is no Add to project button like for libraries you add from the registery.

undone matrix
#

PlatformIO does dependency searching differently then Arduino IDE
So if the a library can't find another library that hasn't been included yet it errors out.
So in your example, Adafruit_GFX eventually ends up calling upon for Wire but it can't find it, so in your file(s) that include Adafruit_GFX include Wire before that include command

So:

// more includes maybe
#include <Adafruit_GFX.h>
// more includes maybe

Turns into:

// more includes maybe
#include <Wire.h>
#include <Adafruit_GFX.h>
// more includes maybe
gilded bluff
#

And that when I went hunting in the PlatformIO library manager I couldn't find one called "Wire" to add to the project.

undone matrix
gilded bluff
#

Anybody know where I can get mklittlefs for LInux? All the googling I;ve done only points to stuff for Windows and refers to a mklittlefs.exe which doesn't work for me

halcyon vale
#

is there a "littlefs tools" package available for your distro?

gilded bluff
short bay
#

Hiii 🙂 someone online? I need help, I got Adafruit MONSTER M4SK - DIY Electronic Eyes Mask and they don't turn me on, any solution? please

leaden creek
#

don't turn you on or don't turn on @short bay ?

#

a 3d printed case can go a long way to makeing something preaty

tight oar
#

it was cross-posted in 3 channels

leaden creek
#

oh

#

I did not see taht

tight oar
leaden creek
#

I was mainly checking to see if someone replied to my request for help

tight oar
#

I don't know any makecode, just look from time to time if I can help with other aspects of it

leaden creek
#

yeah, somethings funky with what I am doing, hopefully I can get something done by sunday morning for the charity run I am in

#

otherwise it will only have something on one side of the switch

gilded bluff
#

When using the Arduino frameowrk with ESP32, how do I tell when configTime() has successfully updates the time?

wanton portal
#

Not to be curmudgeonly, but help-with-Makecode is not “help me make code!” Makecode is a GUI based way to code for microcontrollers similar to Scratch. Maybe we need a little bit of moderation? The signal to noise here is low: last on topic post over two weeks ago.

undone matrix
#

Maybe it needs to be renamed to #help-with-ms-makecode for Microsoft MakeCode

gilded bluff
#

Renaming would be a good option, I feel. I had no clue that such a thing existed.

tight oar
#

seems that peoples aren't really getting help with basic question thought, so maybe the channel isn't really needed then with that + not many ontopic questions

fathom bramble
tight oar
#

also kinda hard for classic programmers to help, kinda like helping someone who drive using a touchscreen, your driving abilities are useless ona graphical version of a dashboard on a tablet

fathom bramble
#

Yeah I can help with simple make code issues but more complex programs I have trouble with

halcyon vale
#

I'm somewhat incapable with block coding. Guess it is a good thing to have available though.

fading matrix
#

hey guys im working with adafruit makecode and am trying to code a long strip of LED lighting. Anyone able to help or has alot of experience.?

vivid jetty
#

@fading matrix It's still pretty early in the US, someone may be around later to help. It might be useful to share where you're stuck - code examples, what you've tried, etc. I saw your post in projects, but it's probably best here

fading matrix
#

ah alrighty, im in australia so its 10:30pm

vivid jetty
#

@fading matrix It might still be helpful to share more, so someone can reply in detail even if you're afk

fading matrix
#

its alright. i was having trouble with the neo pixel photo pen. i couldnt get rid of it once it appeared on the strip. i went online to see how other people fixed it and everyone seemed to be having the same issue as me but no one had solved it. i instead went around it by setting first few pixels to blue then making it rotate down the strip.

hollow oracle
fading matrix
#

nah its led light strips. thankyou tho

fathom bramble
fading matrix
#

i managed to figure it out. and now im trying to get microphone sound sensor to work and im playing with its sound sensitivity and the 2nd LED light isnt turning off

leaden creek
#

I'm glad you managed to work it out with the light strip, I would love to know how you got it working.

#

I still haven't figured out my issue

heady rock
#

guyss

#

please help

#

i have test a code with a bno055, it was working,the bno has broke,after i see a really cool board that was having all the sensor need for me and the imu on it is a lsm6ds33 and the same code,but with two different imu and that didnt work,i have look the two set of 3 gyroscopes from the imu should output in radians/s,im lost i dont know what to do i try plenty of thing,converting to degrees,changing pi value,see the velocity of seqdot,nothing has work

hollow oracle
heady rock
#

in arduino im new to this server i wasnt knowing where to put the message

slow rivet
heady root
#

Hi -
First time posting here, so I am hope it is in the right spot. I have been using the Pybadge for some projects and I ran into some issues using the NeoPixel strip. I used John Parks code https://learn.adafruit.com/pygamer-neopixel-controller , but the strip will not turn on and I am at lost.

I am also wondering if it would be possible to use a microphone just like the PyBadge Tensor Flow Mircophone https://learn.adafruit.com/pybadge-case-with-flip-out-mic to detect sound using the PyBadge and Makecode Arcade.

I appreciate any help I can get and if this is the best place to post these questions.

Cheers!

Adafruit Learning System

Plug in a NeoPixel strip and control its color and animation with PyGamer's thumbstick and buttons.

Adafruit Learning System

Grab this 3D Printed PyBadge Case with can hold a microphone for machine learning applications.

foggy sundial
#

Hey Folks- I'm a teacher using CPX with my students for the first time, and we're using the makecode block code to program our devices. One of my students is trying to use a light threshold trigger, but it's not making a whole lot of sense. The help file says that the sensor is relative, not absolute, which (I think) explains why the readings in the console weren't matching the value in the threshold limit settings (which also are from 1-255).

I'm trying to get more information on how "threshold" is determined for the light sensor so I can share that information with my student and we can come up with a working program for her purposes. If anyone has insight I would be most grateful.

hollow oracle
#

it's true it doesn't answer your question. Perhaps when makecode starts up it takes the current light level as ambient, and then "bright" means a significant amount above that, but I don't know what the threshold is

#

I have looked for the actual code that implements this and haven't found it yet

foggy sundial
foggy sundial
foggy sundial
tight oar
#

Hello, I have a task, maybe someone can help me

#

Endpoint: [POST] /api/catalogs

Validation:
name - required, min: 5, max: 100
description: optional, max: 300
color: hex
parentId: (parent catalog ID) optional but if set then catalog with this ID must exists

We want endpoint for creating catalog where user will be able to organise its quizzes. Endpoint must be guarded by auth middleware (user must be authenticated). We pass only name, description and color (e.g. #ff0000), organisation owner ID we get from authorised user. Optional we can check max depth which will be 3, so if creating catalog will be on depther then we return validation exception.

plain shard
#

Hi, I have a quick question. I am porting some code from the Feather ESP32 to the Feather M0. Is there an equivalent for ESP.restart(); for the M0? I want to to implement a software reset.

plain shard
#

To answer my own question in case this is being logged anywhere. NVIC_SystemReset(); will do on the M0 the same thing ESP.restart(); does on the ESP32.

hollow oracle
#

MakeCode is a beginner's programming system that uses blocks you drag around on the screen

glad totem
#

Oh, thanks. I'll post there. Sorry about that.

dusty briar
#

Hello, I got two adafruit BME280 connected to a Pi Zero 2 and I want to test them. Can somebody help me to understand what I need to add to show both sensors? Where can I enter the i2c address?

#

Both are alive, one at 0x76 and the other on 0x76

still trench
heady root
#

Is this the correct place to put questions about using Microsoft Makecode with Adafruit boards?

undone matrix
#

Yes

heady root
#

Great! I am teacher and I am using Pybadges in the classroom and I want a way to be able to detect sound. I purchase the tensorflow kit, but I am not quite sure how to use it with Makecode blocks. What I really want to know, would it be easier to use the Edgebadge since it is basically the same board as the Pybadge but with a built in microphone?

hollow oracle
tight oar
#

How do I get makecode to download a uf2 file to my computer

#

It keeps saying it's downloaded but I can't find where it pi it

#

Put*

undone matrix
#

Look in your downloads folder???

tight oar
#

I'm not that tech illiterate

hollow oracle
# tight oar yeah thanks

if it showed as a download in your browser, then it will be in the browser download list and you can "Open Containing Folder" or similar. If you have file extensions turned off on Windows, it may be confusing.

gritty canopy
#

I'm new to MakeCode (mentoring some elementary school students) does MakeCode work with the CircuitPlayground Bluefruit + Crickit?

#

I couldn't get the downloaded code to run

slow rivet
# gritty canopy I'm new to MakeCode (mentoring some elementary school students) does MakeCode wo...

There appears to be beta support for the Bluefruit, but it's on maker.makecode.com. If it works for you, I think it should work with the Crickit, because you're simply sending data to the Crickit, but I can't guarantee it. Unfortunately, I've never tried it. I would suggest something simple like controlling the NeoPixels or something first to make sure the Bluefruit is working with MakeCode to begin with. Then see about the Crickit.

gritty canopy
#

@slow rivet Thank you, I will check it out 🙂

slow rivet
#

You're welcome! Good luck!

gritty canopy
#

I'll need it

tight oar
#

hi

#

how would I use sound to control LED brightness for adafruit using makecode

tight oar
#

hi

#

I have an FSR as an input device, but everything seems to work in reverse

#

is there anyway to fix this?

hardy hazel
#

Hello I am working on a project where I need to wire four mirco switches as inputs into a adafruit v2.3 motor shield. I am having trouble wiring these switches to a ground and was wondering if I can connect the ground wires of all my switches into one wire then have that one wire go into the ground terminal of my board. Will this allow me to see if each switch is pressed?

tribal pecan
hardy hazel
#

ok

round coral
#

For my current project (using bbc microbit) i want to be able to change the time using 4 switches so like hold 'timeset'button then hit a button for hour and another for minute then also have a button for' alarm set' i want them to be able to change the digits on the sceeen if thats possible thanks

gleaming finch
#

when using an animation on a CPX - how do you change to color used for the animation - say for the color wipe or running lights?

burnt saddle
gleaming finch
#

Blue is a nice color...it would just be nice to have some control...sigh...

dreamy pawn
#

What is makecode?

gleaming finch
dreamy pawn
#

Good for kids of all ages?

gleaming finch
#

Hoping to use it with my 7 year-old granddaughter.

dreamy pawn
#

Want to use it with my 7yo son

#

He wants to make robots

dreamy pawn
#

Is there any French documentations?

velvet sand
#

Not everything has been translated.

dreamy pawn
dreamy pawn
#

can we use makecode in any mcu ?

gleaming finch
#

Go here https://maker.makecode.com select new_project then give it a name and it will show you the supported boards...there are many

#

Actually it shows the boards on the first page. Not as readable though.

dreamy pawn
#

yeah

tight olive
#

is there a extention that uses arduino?

undone matrix
#

Not that I know.
If you want to use Arduino just use Arduino IDE or PlatformIO

quaint ermine
#

Problems with shool project

heady root
#

Has anyone successfully used the PyGamer NeoPixel Controller by John Parker with a Pybadge? I can get it to work for the life of me. I am using the 30 JST Neopixel strip and plugging it into D3, but the strip will not light up only the LEDs on the board. I completed a hardware check and everything seems fine. Does anyone have any ideas would I could be doing wrong?

proven stone
#

Hi all I have a question about using make code with the adafruit feather and prop maker board and trying to using the accelerometer

leaden pulsar
#

is there any way to loop something with makecode?

#

i tried looping but it just resets my board when its done

undone matrix
#

Try using a forever block?

#

(In loops category I'm pretty sure)

sage knot
#

Hi! im having big issues with a itsybitsy nrf52 when im trying to make it read analog input. is this the right place to ask for help about that?

fathom bramble
sage knot
fathom bramble
#

Ah ok, no you're in the right place

#

I don't have really any experience with MC but hopefully someone who does popsin

sage knot
#

i mean, if you have js or python skills that does the trick too

fathom bramble
#

I'm unfortunately not able to help just now, sorry!

sage knot
dawn kernel
#

My Circuit Playground Express won't boot, I've tried a variety of cables and ports and when I hit the reset button, my LEDs never turn green, they stay red 😢 Any ideas of what I can try? Arduino IDE won't find my board either, after installing latest driver too...

digital merlin
tight oar
bleak valve
undone matrix
#

In MakeCode Arcade, you can change the color palette using the color fading extension.

twin quarry
#

Hey all, I just got my hands on some Circuit Playground Bluefruit boards! I can't wait to get started on my project. But I wanted to confirm, we cannot use makecode and code in JavaScript for these boards? Just checking as I'm much better with JavaScript than I am with CircuitPython, but I can use it if I have to.

slow rivet
#

I had to dig to find it - make a new program there, and then click the ... next to the "Download" button, and click "Choose Hardware". You'll find a list of supported boards there.

twin quarry
lyric anchor
#

Hi all,

#

Very new to electronics, making things, etc. Trying to get my Circuit Playground Express to play a little melody I wrote in MakeCode. I'm finding that the song is way too quiet to hear, even though the stock sound effects are quite audible. Am I missing something?
Thanks!

slow rivet
lyric anchor
#

got it, thank you!

#

it sounded loud on the simulator but not on the real deal.

#

I had to set the volume to max to make them equivalent. Thanks!

lyric anchor
#

I have another question about music in MakeCode. I'm struggling to make a capacitive touch keyboard, again with the CPX. I am wondering if there is a way to make the note hold for the duration of a touch like it would on a piano. I am using While blocks but the given note lengths seem fixed. I'm wondering if there is another approach I'm missing.

#

I have also done the same using If/then blocks and it behaves similarly. I would love for the tone to hold for the duration that the pin is touched.