#help-with-makecode
1 messages · Page 6 of 1
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
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!
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
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
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
Well... I'm working locally so far, with a pxt-maker cloned repository (https://github.com/microsoft/pxt-maker) . I'm just following this: https://www.hackster.io/wallarug/makecode-creating-custom-boards-92d933#toc-step-6c---config-ts-10
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 🙂
Thank you so much! I'm about to ask the developers here: https://forum.makecode.com/t/add-new-board-makecode/3957/6. You can join the thread and we'll help each other! 🙂
I found how to add support lol, just had to do some digging
Maybe a week or so to get everything setup and testable
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
Lol, sounds good!
I’ve got some IT type work to do tomorrow for family so I’ll just start working on it then
HEELP
where can i ask for help about pybadge?
i just got a pybadge lately, and am confused on a few points.
Depends on what you are asking about
um about the coding
Depends on the language.
If it's about MakeCode, ask here. (Although the MakeCode forums may give you a faster response at https://forum.makecode.com)
If it's about CircuitPython , ask in #help-with-circuitpython
If it's about Arduino, ask in #help-with-arduino
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.
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
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.
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
Ah ok. Then yeah, my unfamiliarity is showing. It was a guess.
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
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.
Not very familiar but I can try!
@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!
@slow rivet Thanks
does the CP bluefruit just not work at all with makecode.adafruit.com? Do you have to use maker.makecode.com for it?
I don't think the Bluefruit has any support for makecode.adafruit.com - see this post - https://forum.makecode.com/t/circuit-playground-bluefruit/741
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.
arcade.makecode.com is probably the most used site in the makecode domain, so the devs put their effort there, afaik
yes
they just convert the python to typescript - so sometimes it doesn't work (it's new-ish)
Is it possible to collaborate in real time with makecode?
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
no, but if you are using makecode arcade you can use github
thanks
Hi everybody, has anybody of you experience debugging MakeCode configurations? - The microphone of my "Circuit Playground Bluefruit" crashes any MakeCode script totally.
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.
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...
I have no idea. I don't work with Make Code. Filing an issue on GitHub is likely the best thing you can do. Please do not ping admins or moderators unless you're reporting a moderation issue. Thank you.
Thank you for the feedback
It's a valid question, but I don't know that anyone here will have an answer for you.
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.
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.
Thanks for your judgement, CPB is a great product - my Kids like them and such solderless products are great to start.
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!
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.
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
can we see your code? just to make sure we're all on the same page.
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
Don't be scared! Is this all of it?
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
I am trying to teach my team how to do it, but I am not having much luck myself.
That sounds frustrating but I'm sure you can do it!
I understand the basics, and I get get the internal sensors to work, but where this is an external sensor I am struggling
what does happen when you run the code?
the lights come on and the siren goes off, but there doesn't seem to be anything happening with the pulse sensor
I have the ground on gnd, the sensor is on A3, and the other is on 3.3v
so let me show you how I changed your script, although it'll need more changes.
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
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
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 😫
you'll probably get weird results because of the 120 and 95 parameters
ok I will change that and see if that helps
your analog read gives you a value between 0-1023 representing the voltage between 0-3.3 V
i see
so we'll have to figure out what number represents what beat per minute and scale appropriately
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
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
I have the sensor connect to alligator clips with a jumper wire in between
I hope that is correct, or not a bad connection
that should be ok
ok cool
did you see this project? They do exactly what you're looking for https://github.com/JanTadeuszEkiel/homelab Checkout the README
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
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
yeah you won't be able to graph but you can still do the math
ok
does the project make sense?
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!)
You sound like you're learning, not like an idiot.
I think you can disregard the on Start Show String, forever show number, and forever serial out blocks
ok
I don't know if variables get initialized to 0 by default or not, but might put in on start time1 = 0
yes? I think the coloring is different for some reason
that is what was confusing me
ok working on it
I can't find the purple one that says running time 🤦♀️
I think you're looking for millis (ms) in CONTROL under ADVANCED
ok thanks
This is what I have, but when I download it doesn't do anything when I touch the pulse sensor?
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.
Ok, does it matter where in the if and else if that I put it?
I don't think so.
Something like this?
Yep
ok, I tried and still nothing
wait hold on i made a mistake let me try again
well, nevermind still nothing
Is your sensor lighting up?
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
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.
Ok, do I use the variables in there or another way?
I'm sorry, I am trying to learn 😦
you do use the variables in there, and no need to apologize
Like take all of this out?
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
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
what happens when you touch the sensor?
nothing
hm this would be easier witha serial console
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
what values for if pulse > have you tried?
sorry I meant did you try if pulse > 100? 200? 300?
yes i went all the way up
Hm
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
ok! Good luck at the competition
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.
@celest gate good stuff here 🙂
Trying that!!
+1 for circuitpython as well, although may be too much of a jump for your students
It is still just staying on that one color 😫
Green or red?
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
dumb question, but you're touching the right side of the sensor right? I've made mistakes like that before so just checking
< less than or > greater than?
well i have tried both ways, just trying everything
yes, I checked to make sure it was the right side 🙂
Try > 500 and maybe do it in a dark room, see what color you get
ok
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.
at 500 it was red.....at 600 it was green and I turned the lights off and still no change
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.
2 us may be too fast for you to tell
i tried 5 too
🙂 Can you change that to ms? Otherwise try 1,000,000
yeah a microsecond is a millionth of a second 🙂
so while 5 is much longer it is still gonna be hard to see
hahaha oops!!
ok stupid question, how do I change it? I don't see another wait block
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
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
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?
No your variable assignment looks fine, it's just an Analog Read
ok
I'm starting to wonder if the sensor is defective, let me look at the site again to make sure it's wired correctly
and it is set to A3 which is where it is plugged into
how much wire is exposed from the sensor?
and are those female to male jumpers?
do you have purple ->green alligator clip there?
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
Maybe it is a bad sensor, it seems like it should be responding to something we have tried
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
ok, if you don't mind. I don't want to take up all of your time!
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.
PC
and I don't mind 🙂 happy to help some kiddos with their competition (i assume kiddos)
yes 6-8th grade
between the 3 of us I'm sure we can find something
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!!!
wow!
Are you familiar with any terminal software, putty or SecureCRT for example
I was going to suggest mu for a beginner but PuTTY is really a better option
I am not familiar, but I can be haha
Hmm, mu might make the connection automatically? At least it does when I'm using it for CPy
it does ime
I have Mu downloaded, I was playing in that last night
not that I knew what I was doing hahah
Are you just using https://makecode.adafruit.com/ to do your makecode?
A Blocks / JavaScript code editor for the Adafruit Circuit Playground Express.
Yes
Look in advanced, click extensions, type serial in the search box and add the serial uart extension
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
It's saying it can't find the board
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.
ok, I am going to head home too. Will you all be around in about 30 mins?
we can get you set up with Putty for serial comms
just ping me when you get back 🙂
ok, give me 30 mins and I will be back
https://learn.adafruit.com/circuit-playground-express-serial-communications/makecode So this example uses a USB to serial adapter, but I think it should still be possible to use the microusb port, just need to find the correct COM to connect to in putty, hopefully.
I've only done makecode serial on the micro:bit so I suppose it could be different.
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.
When I plugged it into the Arduino IDE it showed COM 6
Windows is weird com can change
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
there should be devices under there
you can do windows Key + "Device Manager" to find it
cool so what happens when you put in COM6 to putty and click Open
Were you able to add the serial write to your make code?
Like this?
Do that but put it in a forever block preceded by your analog read
ok
Siting down to dinner, will check back in a bit
so download just that from make code?
yup!
in putty?
yes
I'm not sure
the good news is we can do this in CircuitPython
ok cool
if you're up for it, let me write up the code real quick
is that something I need to download
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
Make faster and easier than ever with MakeCode, code.org CSD, CircuitPython or Arduino!
ok when I download it want to open weird. Is there something special I need to do
oh ok
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)
make that your code.py file from mu
so copy that into mu?
yeah and save the file as code.py
python is sensitive to whitespace so make sure the spacing doesn't get messed up 🙂
yeah that should work just fine
ok so did you install circuitpython?
yes and I followed directions....now instead of the drive saying PLAYBOOT it says CIRCUITPY
perfect!
ok!
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
it says unable to open connection...unable to open serial port
yep now its COM 12 lol
haha
yes its running lots of numbers
FYI here's the source for getting makecode back
are they roughly static? or all over the place?
yes like 12540, etc
ok what if you put your finger on the pulse sensor?
I think I know why our makecode wasn't working
its doing the same thing when I do that
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
Make faster and easier than ever with MakeCode, code.org CSD, CircuitPython or Arduino!
ok thanks1
Also there is a way to plot with Mu, let me find it, we can see whether a pulse is coming thru
what happens if you: close putty, then click serial in mu?
Put your write in () with a comma after it to make it plot
in putty?
in cpy
I didn't know that, good to know!
in mu it's running the same numbers
ahhh
Just figured that out a couple days ago
ok now the numbers running have () around them and a comma
ok there should be a plotter button
ok, clicked it
anything showing up?
sayd data flood
ok plotter is open now
it doesn't change....flat line ( I think I may not have a pulse LOL)
hrm
I am starting to think there's something wrong with the sensor let me read about it a bit
I'm frustrated on your behalf 😦
could the value on the plotting graph be too distanced apart to read?
I doubt it it looks like a solid line, it should scale automatically to fit the plot
oh ok
Hmm only thing I can think of is that the sensor is busted, but someone else likely knows more than me
You could try this example, if you have a multimeter, just to verify the sensor. https://pulsesensor.com/pages/mutlimeter-fun
ok weird, when i unplugged the male to female part on the purple wire it started plotting
what's it look like?
ok that's probably floating. What happens if you put your finger on it
oh duh I don't know why I asked you to test an unplugged sensor >.>
if i shake it or move it fast it plots up and down
is it plugged in right now?
no
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
yeah that happens because the pin A3 is "floating", not at any defined voltage
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
I think that narrows it down to the sensor
ok, lets say it were working
I realize your competition is in two days but you might see if they offer any support
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
hmm let me write that up real quick
It could be buggy but there is JS code online I can steal from
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
that's really cool!
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!!
wow I hadn't even considered how tough this would be with quarantine
It has been a CHALLENGE to say the least!!
But they are rockstars and have persevered!
blue if under 65 sorry I didn't mean to say 95 earlier
it can be green
hotay! We're almost there
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
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
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?
yeah sure thing
https://github.com/JanTadeuszEkiel/homelab/blob/master/README.md is what I used, https://github.com/JanTadeuszEkiel/homelab is the main page
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!
This community has helped me more than I helped you so I'm just starting to pay them back 😛
Sorry I couldn't be more help, Lews is the real hero
We will go over this website tomorrow, along with CP and everything else so that they get a better understanding of it
we would have been stuck plotting for an hour if you hadn't come along with the tuple help
No, you both were amazing!! I am very thankful for you all!!
I completely missed that in the guide
I have learned lots!!
adafruit learn guides are a great help if you're ever stuck
I know FLL robotics programming like the back of my hand, but this is quite different!! lol
that sounds fun!
It is amazing!!
In case you would like to see our robot run here is the link! 🙂 https://youtu.be/XfD374p93eA
They scored a 425, right now the state high is 405, so we are hopeful!! They rocked it in robot this season too!
super impressive!
please do
Take care and have a great night!
Great, good luck!
Thank you!
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
That's awesome @celest gate!!! Congrats to the team with all the work and effort put into it!
❤️
That is great! Congratulations to your team.
That's so cool! Congrats
Naive question: What are the “networking libraries” the deprecation warning is referring to (and can we not link them in the Sphinx docs) https://circuitpython.readthedocs.io/en/6.1.x/shared-bindings/network/index.html
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
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.
This the Microsoft make code?
Yes
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
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 😦
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
Thank you for your answer. Yes i select the Gemma M0 that is the one that can i simulate with too. It shows me on the top left. I dont now why i cant run the simply blink test :(
Hi, I have an issue with loading the site https://makecode.adafruit.com/#editor offline. In the past I was able to load the editor once while online, then access it offline since it stored it in cache. I am not able to do that anymore, any insights?
A Blocks / JavaScript code editor for the Adafruit Circuit Playground Express.
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!
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.
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?
It worked! Thank you so much.
@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.
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.
Thank you for the suggestion. I might need to send different kinds of data that need to kept separate in the future, so I will keep that in mind.
Whats the NeoTrinkey’s Makecode support status?
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
The MakeCode forum is probably a better place to get help: https://forum.makecode.com/
Thank you!
Hello, are there instructions how to port Circuitpython to a new chip (ARM cortex M3 derivative)?
@eternal tide you may want to ask that question in the #help-with-circuitpython or #circuitpython-dev channel - this is for MakeCode 😉
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
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?
yourString.c_str() probably
Thank you. I didn't say that I am a layman in programming. Is it a variable that a string produced e.g. by a function can be assigned to?
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?
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";
- The
*indicates a pointer - so it knows it's a array ofchars. You could also do this:char my_string[] = "/image.bmp"; - Probably don't want to name your variables after built-ins 🙂
Yes, you are right, I have made a stupid syntactic error. Thank you very much.
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
The QTpy does not seem to be supported (yet) in maker.makecode.com - gonna have to use CircuitPython or Arduino probably
Yeah got it going in Arduino, there are some really helpful sketches.
I have the SAMD py btw which can run my cpx makecode
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?
I think there is a thread on the MakeCode forums about it - tl;dr: there isn't any support currently
Microsoft Makecode developers - Please do tell me why MM still has not cared to create extensions for lets say the nRF52840 bluetooth chip, as well as other hardware items? These hardware items (from Adafruit) has been around for several years now, and can be found in various Python libraries. And yes I would also like to have an extension for...
👍 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.
@arctic zealot I think it's development time. CircuitPython uses the same hardware and can do bluetooth
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 🔍
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.
A little more progress. I found this example https://maker.makecode.com/06090-41344-31521-80386
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)
I am using a Gemma M0 and have the stemma speaker. Can I program something using these in make code?
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!
Strictly looking at hardware, you can output simple polyphony with the atsamd21 and its 350ksps analog out. It could theoretically handle wav file output with that sample rate, but that would require a lot of volatile memory that I’m not sure the Gemma m0 has enough of…
In addition, the 10bit Dac isn’t exactly built to handle wav files, so don’t get your hopes up.
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
I am following the instructions listed here https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/makecode
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?
@wanton portal - I tried on chrome and microsoft edge browsers. Same behavior
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.
@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
Yeah the web bit shouldn’t be affected by the firmware. (Testing) Servos extension loads for me no problem but Crickit won’t (Windows 10/Chrome).
@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.
Crickit extension worked yesterday morning but it may have been cached in the browser.
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
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?
@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?
Under ADVANCED there is ⭕️ PINS. It has some I2C reads and writes. I’m not sure about getting images or even much data out to a display though. Good for a sensor, maybe less so for a display.
What software do y’all use?
Not sure what you mean here on the makecode sub forum. I use the web based editor at makecode.adafruit.com, or maker.makecode.com when I am seeing how the other half lives. What other options do you know about for makecode?
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.
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.
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.
Thanks for the information. That's helpful to know that I'm not somehow overlooking the presence of the JavaScript toggle button. I'll probably end up using the CPX for my project anyhow, so then it wont be an issue.
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!
hi there, I created a void who spam a key, it's possible to creat a buffer for this void ?
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
my guess is on_start is not looping on the hardware?
I should stop guessing stuff this late at night, bad random number generator?
@stone stratus is it possible to see the generated code? would make it easy to spot the issue i would imagine
You're only setting the random number once do you need to add another set x to random line and a delay in your forever loop
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.
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.
Where else might we go for help, if there's no answer here?
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!
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.
Did you get it figured out? looks like RGBW strip throwing off the pixel order
Hey! I was just sitting down to order the level shifter and a 10v power source for the 5 meter 60 RGBW strip
Hey! I was just sitting down to order the level shifter and a 10v power source for the 5 meter 60 RGBW strip
would you recommend I return to Ada and just get an RGW strip? So strange because the RGBW works perfectly as a 0.5 meter strip, so I do think power is the culprit here...
It is weird the 0.5m works. Try setting the pixel order
ooo lemme try that in just a sec!!
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!!!
Do you mean 10A as in amps 10V is too high for 5V strip
yes, meant 10A. Here's the power supply I bought as recommended by adafruit https://www.adafruit.com/product/658
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
Yeah sounds like a pretty simple bit of code
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
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
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
what it looks like atm
very grateful to you for the hints
i think i will probably end up creating the 256 size array,( maybe as a 2 dimensional array? shame makecode does not have some sort of extension to help with this- wish me luck eh?
Thanks Again
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
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 ....
Thanks for your help ...I probably would have put this problem in a drawer until much later without it ...
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...
Awww sweet! I keep forgetting to look at outside stuff. There’s a lot of extensions for (say) microbit that don’t seem to work with the Adafruit boards, and the ecosystem is worse for it.
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?
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.
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
I get that, but that's not what annoyed me. What annoyed me was that PlatformIO didn't add all dependant libraries to platformio.ini when it converted an Arduino sketch to a PlatformIO project.
And that when I went hunting in the PlatformIO library manager I couldn't find one called "Wire" to add to the project.
Yes, I do wish that PlatformIO did that
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
is there a "littlefs tools" package available for your distro?
Not that I have been able to find.
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
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
it was cross-posted in 3 channels
I think we solved the issue in #help-with-projects yesterday
I was mainly checking to see if someone replied to my request for help
I don't know any makecode, just look from time to time if I can help with other aspects of it
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
When using the Arduino frameowrk with ESP32, how do I tell when configTime() has successfully updates the time?
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.
Maybe it needs to be renamed to #help-with-ms-makecode for Microsoft MakeCode
Renaming would be a good option, I feel. I had no clue that such a thing existed.
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
Something similar happens with #help-with-wippersnapper-and-adafruitio people think it's a gpio channel
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
Yeah I can help with simple make code issues but more complex programs I have trouble with
I'm somewhat incapable with block coding. Guess it is a good thing to have available though.
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.?
@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
ah alrighty, im in australia so its 10:30pm
@fading matrix It might still be helpful to share more, so someone can reply in detail even if you're afk
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.
Are they NeoPixels? Here's a guide: https://learn.adafruit.com/neopixels-with-makecode
nah its led light strips. thankyou tho
Which led strips? Often those are neopixels. The guide has a section for external strips.
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
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
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
are you coding this in MakeCode or something else?
in arduino im new to this server i wasnt knowing where to put the message
Please post your question in #help-with-arduino. You'll get better help there. We usually discourage cross-posting in multiple channels, but I'm telling you to do it this time, so it's fine. Welcome to the server!
thanks!
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!
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.
Have you seen this? https://learn.adafruit.com/sensors-in-makecode/light-sensor
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
Yes, that was one of the reference documents I had looked at. Thanks for making sure I saw it.
It seems like we've run across the same docs, but there doesn't seem to be good documentation for how the threshold is determined. I'll see if I can play with it a bit more to back-manufacture how it's set up. I think your idea about ambient being set at startup and then deviations +/- from that result in triggering the dark or bright condition.
For anyone following this later, it seems my classroom is quite dark, so there's a default reading of "dark" as the ambient light level. Putting a flashlight/LED in front of the light sensor on boot seems to help with this. Still working to determine how the threshold is calculated.
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.
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.
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.
Hi, this is the MakeCode help channel. #help-with-arduino would be where you want to ask
MakeCode is a beginner's programming system that uses blocks you drag around on the screen
Oh, thanks. I'll post there. Sorry about that.
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
i would say go to #help-with-linux-sbcs, but i think you need to change the i2c addr of one
Is this the correct place to put questions about using Microsoft Makecode with Adafruit boards?
Yes
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?
I am not sure if MakeCode has microphone support with the EdgeBadge. It does have microphone support with Circuit Playground Express
Thank you for the response!
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*
Look in your downloads folder???
yeah thanks
I'm not that tech illiterate
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.
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
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.
@slow rivet Thank you, I will check it out 🙂
You're welcome! Good luck!
I'll need it
hi
I have an FSR as an input device, but everything seems to work in reverse
is there anyway to fix this?
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?
Please do not post the same question in multiple channels.
ok
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
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?
I don't think you can change the colors for the built in animations.
Thanks -- I was afraid of that 😦 seems rather limiting. Always Blue
Blue is a nice color...it would just be nice to have some control...sigh...
What is makecode?
It is a "block-style" coding interface see https://learn.adafruit.com/makecode
Good for kids of all ages?
Hoping to use it with my 7 year-old granddaughter.
Is there any French documentations?
Not everything has been translated.
Will be better for my son. He reads French but no English yet.
can we use makecode in any mcu ?
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.
https://makecode.adafruit.com appears to be dedicated to the CircuitPlayGround Express
yeah
is there a extention that uses arduino?
Not that I know.
If you want to use Arduino just use Arduino IDE or PlatformIO
Problems with shool project
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?
Pygamer NeoPixel Controller Guide - https://learn.adafruit.com/pygamer-neopixel-controller/code-the-control-in-makecode-arcade?embeds=allow
Hi all I have a question about using make code with the adafruit feather and prop maker board and trying to using the accelerometer
is there any way to loop something with makecode?
i tried looping but it just resets my board when its done
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?
Depends on the language you're using. Are you using Makecode?
yes, but i mean it comes out as python/js so i wasnt sure
Ah ok, no you're in the right place
I don't have really any experience with MC but hopefully someone who does popsin
i mean, if you have js or python skills that does the trick too
I'm unfortunately not able to help just now, sorry!
np! tnx anyway!
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...
Please open a thread on https://forums.adafruit.com.
Hi all! Does anyone know of any tutorials or tips on getting the momentary cap touch breakout (https://www.adafruit.com/product/1374) to work using MakeCode?
The closest thing I’ve found is this tutorial, but it codes in CircuitPython and Arduino: https://learn.adafruit.com/neopixel-pixie-dust-bag/circuitpython-code
Try treating it like any other button/digital input
if anyone could help with this it would mean the world i feel like im almost there https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/pull/266\
In MakeCode Arcade, you can change the color palette using the color fading extension.
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.
As far as I know, the CPB was never added to the standard MakeCode. It is however supported by https://maker.makecode.com though it's listed as beta support. That would allow you to use Javascript with the Bluefruit.
A Blocks / JavaScript code editor for MakeCode Maker Boards
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.
Sweet! Thanks. I'll give that a try
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!
Did you try using an on start block with a set volume block inside of it? That should let you set the tone volume.
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!
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.