home.social

Search

316 results for “circuitpython”

  1. Had a bit more fun with #esp32 and #circuitpython - I really love how quick you can iterate and protoype with circuitpython!

    Added a PIR motion sensor and a SR04 sonar sensor to the setup.

    The sonar sensor was really easy, the PIR sensor needed a bit of tinkering to understand what dial does what.

    Both works well.

    Now to set an alarm when either of them goes off to wake the device up from light sleep. Let's see which one works best for that scenario.

    But this is so much fun!

  2. Sat 4/25. Come to BC ArtsFest. 1-3pm is the Student Tech Showcase with #SwiftUI and #CircuitPython projects. Plus LOTS of family friendly performances & works. drive.google.com/file/d/1VHx5n

  3. After I found out that I really enjoy tinkering with #microcontroller and #circuitpython I decided to buy a couple of different brand name boards and a box full of sensors 😅

    What a difference.

    The noname #ESP32 S3 I bought initially are basically e-waste in comparison to one of the brand names.

    With the noname I was struggling to send 20Kb images every 5 seconds. Constant errors and timeouts and RSSI in -70 range.

    With the brand name not a single connection error or send retry.

    Cool

  4. The last 7 days were a perfect learning week.

    I love to learn new things and this week was full of firsts!

    Last Sunday I started experimenting with #esp32. This was my first time working with microcontroller based devices. Before that I only developed for desktops.

    I started with C/C++ in Arduino IDE/ESP-IDE then diving into the TCP protocoll, adding a new board to #circuitpython ,creating a PR for it and diving back into C# after 8+ years of absence.

    #iot #development #developers #csharp

  5. @deshipu thanks for pointing me in the right direction.

    This was a bit of a learning journey but I got my board to work including the camera.

    Took a bit of time to make my own fork, get it compiled, get esp-idf compiled, defining the new board specific pin definitions, build everything, flash image and test.

    It took me only 3 builds (and the whole night) to get the board pins right.

    Everything works! Yeah! 😎

    Next step: Pull request - another first for me.

    #esp32 #circuitpython

  6. I tested the different ways of programming an #ESP32 and I enjoy using #CircuitPython the most as the roundtrip time for code changes is basically hitting save in VS Code vs 30+ seconds on Arduino IDE or ESP-IDE.

    Some learnings:

    Not all board layouts are fully supported. Sadly the ones I bought are one of those meaning the camera doesn't work - the rest does.

    And always buy ones with an IPEX antenna port!

    Will order a couple supported ones and repurpose the others.

  7. Been a while! Lately I’ve been hacking on this little #cyberdeck project. It’s very much in prototype mode at the moment but I’ve built a mini #circuitpython powered launcher that loads “apps” from the SD card and can be navigated by touch or keyboard navigation. The keyboard is hand-wired with tactile switches (to keep things compact) through a Pi Pico that talks to the main brain (a Waveshare ESP32-S3 2.8” touch screen) over UART and can be switched to work as a standalone keeb too.

  8. Trouble remembering to take your meds? Build this reminder box with <$20 in parts to light up when it's prescription time. I leave mine by my coffee maker so I never forget it. Updated lesson for classroom build youtu.be/imafYENxZ_U #TechForGood #CircuitPython #MakerSpace #AssistiveTech #raspberrypipico

  9. Diplo on your Pico! Build a polyphonic multi-sound DJ board on a sheet of paper using CircuitPython and a RaspberryPi Pico! bit.ly/pico-dj-board a super fun classroom build for the #CSed fam. @adafruit Adalogger Cowbell allows gigabytes of sound from the @raspberrypi Pico #circuitpython #raspberrypi #RaspberryPiPico #dj

  10. Finally getting around to playing with my synthiota board and porting my CircuitPython “tbish” TB-303-like synth code. It finally has a UI of sorts! In real time, you can edit steps/mutes/accents/slides & edit 8 synth parameters. It's pretty fun. #tb303 #circuitpython
    youtube.com/watch?v=MjE2wdevc3M

  11. Good luck #CSed faculty prepping for next semester. Show me your maker closets! Here's the cart with many (although not all) of the parts I use for PhysicalComputing: Art, Robotics, and Tech for Good - the #CircuitPython course I teach accessible from new-to-code through advanced CS students.

  12. Today on day 18 of #MakerAdvent I use @adafruit wonderful #circuitpython to create an MP3 player hidden inside a Christmas present. The best part, it activates using a magnetic switch, to surprise the receiver.
    youtu.be/ZoM-Ix2Q0lU

  13. Progress on the project electronics. I found the collection of LCD screens I had bought a while ago from AliExpress and managed to get one wired up and working with a Pico and .

  14. Here's a look at Week 11 of #CircuitPython #PhysicalComputing class. Students made rubber band launchers with a #RaspberryPi Pico, joystick, 3 servos, and a button. Big fun! youtube.com/shorts/envNY1mYCEQ

  15. Your eyes are not deceiving you! I have written a blog post for the first time in many years! I'm live blogging getting to grips with #thepihut Baguette S3, a breadboard friendly ESP32 S3 via #circuitpython Join me during September 13 (today) as I hack around. bigl.es/im-tinkering-with-an-e

  16. I got the restock email yesterday that Adafruit added more #FruitJam to the store. There are still 60+ available this morning as of this writing: adafruit.com/product/6200 #CircuitPython

  17. Forbidden Planet “Krell” Display – MIDI CC Controller – Part 2

    This revisits my Forbidden Planet “Krell” Display – MIDI CC Controller using my Forbidden Planet “Krell” Display PCB with a Waveshare RP2040 to create more of a “all in one” device.

    Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

    If you are new to Arduino, see the Getting Started pages.

    Parts list

    PCB

    This requires a built of the Forbidden Planet “Krell” Display PCB with the following:

    • 2 potentiometers
    • MIDI IN and OUT

    I’ve used potentiometers that are their own knob, as they only poke through the casing by around 5mm or so.

    If it you are able to get longer shaft pots, then that would probably be worthwhile.

    Updated 3D Printed Case

    This requires the following from the Krell Display 3D Printed Case:

    This requires the following options in the OpenSCAD code:

    show_frame = 1;
    show_quadframe = 0;
    show_insert = 1;
    show_support = 0;
    show_quadsupport = 0;
    show_eurorack = 0;
    show_eurorack_support = 1;

    alg_pot1 = 1;
    alg_pot2 = 1;
    alg_cv = 0;

    The frame does not really take into account the PCB at present, but I’ve reached the “good enough I want to do something else” stage, so I’ve just added a couple of small cut-outs (using a hacksaw) for the two MIDI sockets, and am content that the components stick out a bit from the back.

    This cutout has to be 10.5mm from the end, 6mm wide, and 5mm deep.

    At some point I might go back and design a deeper frame that has the cut-outs included and some kind of snap-on back to make it a self-contained box.

    But for now, this is left as an exercise for, well, anyone else 🙂

    Construction

    I’ve used four brass 6mm spacers to screw into the mounting holes in the frame. Then the PCB can be inserted, taking care to squeeze in the 3D printed support around the LEDs and pots, and fixed with 20mm spacers which will also act as “legs”.

    The Code

    I’ve used a Waveshare Zero RP2040 and Circuitpython for this build. This is a combination of some of the test code used for the Forbidden Planet “Krell” Display PCB but with added MIDI.

    The code supports both Serial and USB MIDI.

    I wanted an equivalent of the Arduino map() and constrain() functions and didn’t immediate spot them in Circuitpython so wrote my own:

    def algmap(val, minin, maxin, minout, maxout):
    if (val < minin):
    val = minin
    if (val > maxin):
    val = maxin
    return minout + (((val - minin) * (maxout - minout)) / (maxin - minin))

    This allows me to map the analog read values (0 to 65535) down to MIDI CC values (0 to 127) whilst also allowing for some inaccuracies (I’ve treated anything below 256 as zero for example):

    alg1cc = int(algmap(alg1_in.value,256,65530,0,127))

    I’ve used the Adafruit MIDI library, which I’m still not really a fan of, but I wanted to include MIDI THRU functionality to allow the controller to sit inline with an existing MIDI stream. But it doesn’t seem to work very well.

    I was already only updating the LEDs/MIDI CC if the pot values had changed, to cut down on the number of Neopixel writes required.

    I experimented with changing the scheduling of the analog reads and MIDI but that didn’t seem to help very much. In the end I made sure that all MIDI messages queued up in the system would be read at the same time before going back to checking the pots.

        msg = midiuart.receive()
    while (msg is not None):
    if (not isinstance(msg, MIDIUnknownEvent)):
    midiuart.send(msg)
    msg = midiuart.receive()

    It will do for now. Moving forward, I might try the Winterbloom SmolMIDI library. If that still doesn’t give me some useful performance then I might have to switch over to Arduino C.

    Find it on GitHub here.

    Closing Thoughts

    The MIDI throughput is disappointing, but then I’ve never really gotten on with the Adafruit MIDI library. I use it as USB MIDI on Circuitpython is so easy, so will need to do something about that.

    I’m still deciding on the PCB-sized supports too. The original seemed to have nicer diffusion of the LEDs, but that could have been the difference between 5mm SMT neopixels and these THT APA106s which seem more directional in the first place.

    And I really ought to finish the 3D printed case properly too.

    So this is “that will do” for now, but I ought to come back and finish it off properly at some point.

    Kevin

    #APA106 #circuitpython #ForbiddenPlanet #Krell #midi #midiController #NeoPixel #potentiometer #rp2040 #WaveshareZero

  18. Forbidden Planet “Krell” Display – MIDI CC Controller – Part 2

    This revisits my Forbidden Planet “Krell” Display – MIDI CC Controller using my Forbidden Planet “Krell” Display PCB with a Waveshare RP2040 to create more of a “all in one” device.

    Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

    If you are new to Arduino, see the Getting Started pages.

    Parts list

    PCB

    This requires a built of the Forbidden Planet “Krell” Display PCB with the following:

    • 2 potentiometers
    • MIDI IN and OUT

    I’ve used potentiometers that are their own knob, as they only poke through the casing by around 5mm or so.

    If it you are able to get longer shaft pots, then that would probably be worthwhile.

    Updated 3D Printed Case

    This requires the following from the Krell Display 3D Printed Case:

    This requires the following options in the OpenSCAD code:

    show_frame = 1;
    show_quadframe = 0;
    show_insert = 1;
    show_support = 0;
    show_quadsupport = 0;
    show_eurorack = 0;
    show_eurorack_support = 1;

    alg_pot1 = 1;
    alg_pot2 = 1;
    alg_cv = 0;

    The frame does not really take into account the PCB at present, but I’ve reached the “good enough I want to do something else” stage, so I’ve just added a couple of small cut-outs (using a hacksaw) for the two MIDI sockets, and am content that the components stick out a bit from the back.

    This cutout has to be 10.5mm from the end, 6mm wide, and 5mm deep.

    At some point I might go back and design a deeper frame that has the cut-outs included and some kind of snap-on back to make it a self-contained box.

    But for now, this is left as an exercise for, well, anyone else 🙂

    Construction

    I’ve used four brass 6mm spacers to screw into the mounting holes in the frame. Then the PCB can be inserted, taking care to squeeze in the 3D printed support around the LEDs and pots, and fixed with 20mm spacers which will also act as “legs”.

    The Code

    I’ve used a Waveshare Zero RP2040 and Circuitpython for this build. This is a combination of some of the test code used for the Forbidden Planet “Krell” Display PCB but with added MIDI.

    The code supports both Serial and USB MIDI.

    I wanted an equivalent of the Arduino map() and constrain() functions and didn’t immediate spot them in Circuitpython so wrote my own:

    def algmap(val, minin, maxin, minout, maxout):
    if (val < minin):
    val = minin
    if (val > maxin):
    val = maxin
    return minout + (((val - minin) * (maxout - minout)) / (maxin - minin))

    This allows me to map the analog read values (0 to 65535) down to MIDI CC values (0 to 127) whilst also allowing for some inaccuracies (I’ve treated anything below 256 as zero for example):

    alg1cc = int(algmap(alg1_in.value,256,65530,0,127))

    I’ve used the Adafruit MIDI library, which I’m still not really a fan of, but I wanted to include MIDI THRU functionality to allow the controller to sit inline with an existing MIDI stream. But it doesn’t seem to work very well.

    I was already only updating the LEDs/MIDI CC if the pot values had changed, to cut down on the number of Neopixel writes required.

    I experimented with changing the scheduling of the analog reads and MIDI but that didn’t seem to help very much. In the end I made sure that all MIDI messages queued up in the system would be read at the same time before going back to checking the pots.

        msg = midiuart.receive()
    while (msg is not None):
    if (not isinstance(msg, MIDIUnknownEvent)):
    midiuart.send(msg)
    msg = midiuart.receive()

    It will do for now. Moving forward, I might try the Winterbloom SmolMIDI library. If that still doesn’t give me some useful performance then I might have to switch over to Arduino C.

    Find it on GitHub here.

    Closing Thoughts

    The MIDI throughput is disappointing, but then I’ve never really gotten on with the Adafruit MIDI library. I use it as USB MIDI on Circuitpython is so easy, so will need to do something about that.

    I’m still deciding on the PCB-sized supports too. The original seemed to have nicer diffusion of the LEDs, but that could have been the difference between 5mm SMT neopixels and these THT APA106s which seem more directional in the first place.

    And I really ought to finish the 3D printed case properly too.

    So this is “that will do” for now, but I ought to come back and finish it off properly at some point.

    Kevin

    #APA106 #circuitpython #ForbiddenPlanet #Krell #midi #midiController #NeoPixel #potentiometer #rp2040 #WaveshareZero

  19. Forbidden Planet “Krell” Display – MIDI CC Controller – Part 2

    This revisits my Forbidden Planet “Krell” Display – MIDI CC Controller using my Forbidden Planet “Krell” Display PCB with a Waveshare RP2040 to create more of a “all in one” device.

    Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

    If you are new to Arduino, see the Getting Started pages.

    Parts list

    PCB

    This requires a built of the Forbidden Planet “Krell” Display PCB with the following:

    • 2 potentiometers
    • MIDI IN and OUT

    I’ve used potentiometers that are their own knob, as they only poke through the casing by around 5mm or so.

    If it you are able to get longer shaft pots, then that would probably be worthwhile.

    Updated 3D Printed Case

    This requires the following from the Krell Display 3D Printed Case:

    This requires the following options in the OpenSCAD code:

    show_frame = 1;
    show_quadframe = 0;
    show_insert = 1;
    show_support = 0;
    show_quadsupport = 0;
    show_eurorack = 0;
    show_eurorack_support = 1;

    alg_pot1 = 1;
    alg_pot2 = 1;
    alg_cv = 0;

    The frame does not really take into account the PCB at present, but I’ve reached the “good enough I want to do something else” stage, so I’ve just added a couple of small cut-outs (using a hacksaw) for the two MIDI sockets, and am content that the components stick out a bit from the back.

    This cutout has to be 10.5mm from the end, 6mm wide, and 5mm deep.

    At some point I might go back and design a deeper frame that has the cut-outs included and some kind of snap-on back to make it a self-contained box.

    But for now, this is left as an exercise for, well, anyone else 🙂

    Construction

    I’ve used four brass 6mm spacers to screw into the mounting holes in the frame. Then the PCB can be inserted, taking care to squeeze in the 3D printed support around the LEDs and pots, and fixed with 20mm spacers which will also act as “legs”.

    The Code

    I’ve used a Waveshare Zero RP2040 and Circuitpython for this build. This is a combination of some of the test code used for the Forbidden Planet “Krell” Display PCB but with added MIDI.

    The code supports both Serial and USB MIDI.

    I wanted an equivalent of the Arduino map() and constrain() functions and didn’t immediate spot them in Circuitpython so wrote my own:

    def algmap(val, minin, maxin, minout, maxout):
    if (val < minin):
    val = minin
    if (val > maxin):
    val = maxin
    return minout + (((val - minin) * (maxout - minout)) / (maxin - minin))

    This allows me to map the analog read values (0 to 65535) down to MIDI CC values (0 to 127) whilst also allowing for some inaccuracies (I’ve treated anything below 256 as zero for example):

    alg1cc = int(algmap(alg1_in.value,256,65530,0,127))

    I’ve used the Adafruit MIDI library, which I’m still not really a fan of, but I wanted to include MIDI THRU functionality to allow the controller to sit inline with an existing MIDI stream. But it doesn’t seem to work very well.

    I was already only updating the LEDs/MIDI CC if the pot values had changed, to cut down on the number of Neopixel writes required.

    I experimented with changing the scheduling of the analog reads and MIDI but that didn’t seem to help very much. In the end I made sure that all MIDI messages queued up in the system would be read at the same time before going back to checking the pots.

        msg = midiuart.receive()
    while (msg is not None):
    if (not isinstance(msg, MIDIUnknownEvent)):
    midiuart.send(msg)
    msg = midiuart.receive()

    It will do for now. Moving forward, I might try the Winterbloom SmolMIDI library. If that still doesn’t give me some useful performance then I might have to switch over to Arduino C.

    Find it on GitHub here.

    Closing Thoughts

    The MIDI throughput is disappointing, but then I’ve never really gotten on with the Adafruit MIDI library. I use it as USB MIDI on Circuitpython is so easy, so will need to do something about that.

    I’m still deciding on the PCB-sized supports too. The original seemed to have nicer diffusion of the LEDs, but that could have been the difference between 5mm SMT neopixels and these THT APA106s which seem more directional in the first place.

    And I really ought to finish the 3D printed case properly too.

    So this is “that will do” for now, but I ought to come back and finish it off properly at some point.

    Kevin

    #APA106 #circuitpython #ForbiddenPlanet #Krell #midi #midiController #NeoPixel #potentiometer #rp2040 #WaveshareZero

  20. Forbidden Planet “Krell” Display – MIDI CC Controller – Part 2

    This revisits my Forbidden Planet “Krell” Display – MIDI CC Controller using my Forbidden Planet “Krell” Display PCB with a Waveshare RP2040 to create more of a “all in one” device.

    Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

    If you are new to Arduino, see the Getting Started pages.

    Parts list

    PCB

    This requires a built of the Forbidden Planet “Krell” Display PCB with the following:

    • 2 potentiometers
    • MIDI IN and OUT

    I’ve used potentiometers that are their own knob, as they only poke through the casing by around 5mm or so.

    If it you are able to get longer shaft pots, then that would probably be worthwhile.

    Updated 3D Printed Case

    This requires the following from the Krell Display 3D Printed Case:

    This requires the following options in the OpenSCAD code:

    show_frame = 1;
    show_quadframe = 0;
    show_insert = 1;
    show_support = 0;
    show_quadsupport = 0;
    show_eurorack = 0;
    show_eurorack_support = 1;

    alg_pot1 = 1;
    alg_pot2 = 1;
    alg_cv = 0;

    The frame does not really take into account the PCB at present, but I’ve reached the “good enough I want to do something else” stage, so I’ve just added a couple of small cut-outs (using a hacksaw) for the two MIDI sockets, and am content that the components stick out a bit from the back.

    This cutout has to be 10.5mm from the end, 6mm wide, and 5mm deep.

    At some point I might go back and design a deeper frame that has the cut-outs included and some kind of snap-on back to make it a self-contained box.

    But for now, this is left as an exercise for, well, anyone else 🙂

    Construction

    I’ve used four brass 6mm spacers to screw into the mounting holes in the frame. Then the PCB can be inserted, taking care to squeeze in the 3D printed support around the LEDs and pots, and fixed with 20mm spacers which will also act as “legs”.

    The Code

    I’ve used a Waveshare Zero RP2040 and Circuitpython for this build. This is a combination of some of the test code used for the Forbidden Planet “Krell” Display PCB but with added MIDI.

    The code supports both Serial and USB MIDI.

    I wanted an equivalent of the Arduino map() and constrain() functions and didn’t immediate spot them in Circuitpython so wrote my own:

    def algmap(val, minin, maxin, minout, maxout):
    if (val < minin):
    val = minin
    if (val > maxin):
    val = maxin
    return minout + (((val - minin) * (maxout - minout)) / (maxin - minin))

    This allows me to map the analog read values (0 to 65535) down to MIDI CC values (0 to 127) whilst also allowing for some inaccuracies (I’ve treated anything below 256 as zero for example):

    alg1cc = int(algmap(alg1_in.value,256,65530,0,127))

    I’ve used the Adafruit MIDI library, which I’m still not really a fan of, but I wanted to include MIDI THRU functionality to allow the controller to sit inline with an existing MIDI stream. But it doesn’t seem to work very well.

    I was already only updating the LEDs/MIDI CC if the pot values had changed, to cut down on the number of Neopixel writes required.

    I experimented with changing the scheduling of the analog reads and MIDI but that didn’t seem to help very much. In the end I made sure that all MIDI messages queued up in the system would be read at the same time before going back to checking the pots.

        msg = midiuart.receive()
    while (msg is not None):
    if (not isinstance(msg, MIDIUnknownEvent)):
    midiuart.send(msg)
    msg = midiuart.receive()

    It will do for now. Moving forward, I might try the Winterbloom SmolMIDI library. If that still doesn’t give me some useful performance then I might have to switch over to Arduino C.

    Find it on GitHub here.

    Closing Thoughts

    The MIDI throughput is disappointing, but then I’ve never really gotten on with the Adafruit MIDI library. I use it as USB MIDI on Circuitpython is so easy, so will need to do something about that.

    I’m still deciding on the PCB-sized supports too. The original seemed to have nicer diffusion of the LEDs, but that could have been the difference between 5mm SMT neopixels and these THT APA106s which seem more directional in the first place.

    And I really ought to finish the 3D printed case properly too.

    So this is “that will do” for now, but I ought to come back and finish it off properly at some point.

    Kevin

    #APA106 #circuitpython #ForbiddenPlanet #Krell #midi #midiController #NeoPixel #potentiometer #rp2040 #WaveshareZero

  21. "Shake and Bake: The Ballad of an Accelerometer" a CircuitPython School challenge & solution. #STEMed and #CSed folks, feel free to use for your own courses. Uses a CircuitPlayground Bluefruit which has a built in LIS3DH accelerometer youtu.be/kHNb18eZQ3U

  22. #STEMed and #CSed friends or anyone looking for a CircuitPython set of challenge problems. Today’s exam has epic fun referencing Talladega Nights, Chappell Roan, SNL, Steve Kormacki, and much more. Solutions posted soon.
    youtu.be/sDg-TuBySp8

  23. This week’s stickers go out to Illinois & India. Want one? Post a pic or vid of your work from either #SwiftUI bit.ly/prof-g-swiftui or #CircuitPython bit.ly/circuitpython-school using #BuiltWithProfG & you’re in the weekly random drawing. #STEMeducators using content, LMK & I’ll send to ur class.

  24. I think I've confused my poor #PicoW running #CircuitPython. It thinks I've pressed a reset button the board doesn't have 😆 (I shorted another USB port on the HUB).

    You are in safe mode because:
    You pressed the reset button during boot.
    Press reset to exit safe mode.

  25. The SpaceMouse Wireless

    This is a tale of ancient wizardry, yearning for control, failed prototypes, and just plain bad timing. Let us begin.(...)

    #3d #circuitpython #diy #hardware #hid #mpu6050 #rp2040 #spacemouse #usb

    taoofmac.com/space/blog/2024/0