WelcomeBot

Project Requirements

Due: Tuesday2/20

You will use the skills from class to create your own WelcomeBot! Take what you’ve learned/made from the BloxBots Workshop and combine it with the Circuit Playground Express Lab and code below. Your WelcomeBot should be interactive and respond when someone comes close to it. 

Requirements

Document your process on your web site, including successes and failures encountered along the way. There should be:

Process

Step 1 sketch

Tabbi drew the sketch of the wooden robot

Step 2 3D models

I built a 3D model for the robot for the finalized design

Step 4 Connecting

Tabbi drilled the holes and connected different parts of the robot together

Step 3 Wooden Boxes making

I scaled the components, made them, and polished them

Step 5 Final product

I then add the playground circuit together with the wooden robot, the code imported into the playground circuit is attached below and sourced from CS 107 – iDesign LL (S24)

Circuit Playground Express – Sketch

// Using the onboard sound sensor, light NeoPixels in response to ambient noise



#include <Adafruit_CircuitPlayground.h>



// react only to sound levels above this value

// this is a starting value that will be updated during calibration

int baseSoundLevel = 65; 



// parameter for tuning how sensitive the lights are to sound

int soundSensitivity = 4; 



// parameter for how long to collect ambient data during initialization for calibration

int numCalibrationSteps = 500; 



void setup() {

  Serial.begin(9600); // this will let us print to the "Serial monitor"



  CircuitPlayground.begin(); // initialize the board

  calibrateBaseSoundLevel(); // invoke a function to calibrate to current sound level

}



void loop()

{

  Serial.print("Sound sensor: ");

  float sensedSound = CircuitPlayground.mic.soundPressureLevel(10);

  Serial.println(sensedSound);

  delay(10);

  

  for ( int i = 0; i < 10; i++ )

  {

    if(sensedSound > baseSoundLevel + i*i/soundSensitivity)

      CircuitPlayground.setPixelColor(i, CircuitPlayground.colorWheel(25 * i));

    else

      CircuitPlayground.setPixelColor(i,0,0,0);

  }

}



// detect current sound levels and use them to calibrate the sound level

// this will be stored in the baseSoundLevel variable as a reference for

// comparison -- only sounds with larger values will cause the NeoPixels to light

void calibrateBaseSoundLevel()

{

  Serial.println("Calibrating...");

  

  float accumulatedLevels = 0; // we'll collect levels for a few calibration steps

  float maxLevel = 0; // we'll track the largest value we find



  // collect data for a few calibration steps

  for ( int i = 0; i < numCalibrationSteps; i++ )

  {

    // determine the current sound level

    float sensedSound = CircuitPlayground.mic.soundPressureLevel(10);



    // add to our running total

    accumulatedLevels += sensedSound;



    // check if we've exceeded our current max

    if ( sensedSound > maxLevel )

      // if so, update the max

      maxLevel = sensedSound;



    // wait a small amount between calibration steps

    delay(10);

  }



  // now compute the average level and store it as our base value

  baseSoundLevel = accumulatedLevels/numCalibrationSteps; 



  // attempt to calibrate a bit more using the max value

  baseSoundLevel += (maxLevel - baseSoundLevel)/(soundSensitivity*soundSensitivity);



  // print the computed values out

  Serial.print( "Base level: " );

  Serial.println( baseSoundLevel );

}

Reflection


Requirments

challenge yourself to step back and think about any parallels you can draw to your learning journey at large, using these prompts:

  • have there been courses or co-curricular activities that you have embraced or turned away from because you felt a stronger or weaker sense of belongingness?
  • looking back, did messages from the environment play a role?
  • if you were to revisit a decision to embrace or turn away from a course/activity, what would you tell your former self?

I never rode a horse until my junior year in college. Being an international student who couldn’t even speak English fluently, I was having a hard time understanding my coaches’ instructions. The communication issues remained so severe that I almost wanted to quit riding. My coaches and my teammates, however, tried their best to me a sense of belongingness. They searched online for how to pronounce my name properly, left a space in the center of the lounge to make me feel engaged in the meeting, and helped me every time whenever I needed anything. Their efforts in giving me a sense of belongingness made me continue my riding journey.

My case thus proved that messages from the environment indeed play a crucial role in people’s decision-making. If the messages from the environment are more positive, people tend to remain connected with that workspace, and vice versa. For some of my language courses, I didn’t have a pleasant experience as some of my course instructors didn’t like to interact or provide any timely feedback, which made me lack a sense of belongingness, so I quit learning some languages. I would tell my former self now, that if the surrounding environment can’t give you a sense of belongingness, you have to always be strong enough to stay in an unfavorable environment no matter whether you have a sense of belongingness or not.