Wednesday, 22 July 2026

Day 13- Project work, visitors from American College of Sofia in Bulgaria

 

   Maeve works her embroidery magic:


    


   Team from Hisar School(https://career.hisarschool.k12.tr/?lang=en), Istanbul:




     Visitors from American College of Sofia
    (Emily Sargent Beasley) (https://www.acs.bg/ )
     in Sofia, Bulgaria:











Team Robo Dog: Successful Test of Mechanism


Team  SMUR Radio:



Team Star Glasses:

  Was able to get data from GPS module.


   Experimenting with the class frame and lenses:












Team Angel Wings:




    3D-printed bird's head:


    Making paper-mache body for bird:














Team Rocket Goat



     Rocket-Goat Instrumentation package:






Team Grabber:

     Test of new adapter bracket:


    Discussion on using pullup resistors to detect button pushes:


  Colin's Lab: Pull Up Resistors



 







  As implemented in MakeCode:

       Microbits have internal pullup resistors
       which can be implemented in software:

       Microsoft MakeCode
  1. Drag the set pull block from the Pins menu (under "Advanced").
  2. Select the specific pin (e.g., P0) and set the pull mode to Up.
  3. Wire your external switch/button between the chosen pin and GND. When pressed, the pin will read 0 (LOW); when released, the pull-up resistor sets it to 1 (HIGH). [1, 2, 3]

       In Advanced--->Pins--->More  menu, set pull pins to Up


    
   In Advanced--->Pins---->Digital Read




       In sensor loop, digital read pin connected to ground 
       via pushbutton- if =0, button has been pushed.



    In Receiver on arm/cart, 

    Extension used: Kitronik Robotics Board



      action taken depends on number received.

      First part controls car using tilt sensor in remote control;
      Second part controls sensors determined by number received.

     Motor wiring can be confirmed using test program- if car runs backwards when button A pressed, reverse motor leads.

If  car turns left when button B pressed, swap motor connections.


Extension used: Kitronik Robotics Board

      action taken depends on number received.

      First part controls car using tilt sensor in remote control;
      Second part controls sensors determined by number received.


   


Servo settings can be determined with a test program, with servos can be set to the correct angle and the angle measured:






Some success with transmitting labeled data in MakeCode- AI(Gemini) to the rescue:

n using the radio function in Makecode for Microbit, why can data sent with the name + value sometimes get grabled on receipt?

When using radio.sendValue("name", value) in MakeCode, getting garbled, dropped, or "ghost" data is a common frustration. It almost always boils down to how the micro:bit's radio chip handles rapid-fire packets, strict memory limits, or crowded airwaves.

Here is exactly what causes the data to corrupt and how to fix it:

1. The forever Flood (Data Collisions)

If you place your radio.sendValue() block inside a forever loop without a delay, your micro:bit attempts to blast hundreds of packets per second into the air.

When it does this, two things happen:

  • Packet Collisions: If two micro:bits broadcast at the exact same millisecond, their radio waves physically interfere, scrambling the packet mid-air.

  • Buffer Overload: The receiving micro:bit simply can't process the incoming data fast enough. Its memory buffer fills up, causing it to drop parts of the message or merge old data with new data.

The Fix: Always give the radio time to breathe. Add a pause block (even just 50 to 100 milliseconds) immediately after sending data.

2. The 8-Character Name Limit (Truncation)

Because the micro:bit uses very small data packets to save memory, radio.sendValue() is heavily restricted.

By design, the name string portion can only be 8 characters long (though some older MakeCode versions allowed 12). If you try to send a name like "temperature", MakeCode abruptly chops the word off because it exceeds the limit. The receiver might get "temperat", which looks garbled and will fail if your receiving code is checking for the full word "temperature".

The Fix: Use short, abbreviated names for your values. Instead of "temperature", use "temp". Instead of "player1score", use "p1".

Adding a pause between packets worked!




       Sending Unit:


   potentiometers connected to P0,P1, P2, and P3

    LED=False (to use P3)













No comments:

Post a Comment