Tuesday 2/13
Kris Camp leads the BloxBots workshop!
Belonging is not always about whether you believe you can do something. It is also about whether you see yourself as a “tech person.“ This component of belonging is related to mindset: the static idea of a “tech person” can indicate a fixed mindset about who is in tech.
Talk with your partner about what resonated in the video and reflect on whether it has played a role in the courses you have chosen to (not) take
After about 8 minutes, each pair will have about 2 minutes to share out
Due: Tuesday, 2/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.
the input for the bot uses the on-board microphone to sense sound levels
the output for the bot is pre-programmed with LEDs
[optional] if you'd like, you can modify the code (or get some assistance modifying the code) to respond in other ways!
Requirements
Document your process on your web site, including successes and failures encountered along the way. There should be:
pictures of your design and steps that you took when creating the project
the woodworking components of the bot "body"
a sketch of how you will incorporate the Circuit Playground Express
a final video or collection of photos that demonstrates the final product
a reflection on the project and how it relates to the topics of belongingness (which can intersect with self-efficacy, mindset and active listening)
you can choose to write the reflection (3-4 paragraphs) or record it as video/audio (1-3 minutes)
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?
This sketch uses the on-board mic to sense sounds and show different LEDs in response. You'll use it to make your WelcomeBots!
// 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 );
}