Toothbrush Expanded

Sophie Lowen
TETL
Published in
3 min readNov 1, 2021

This week I really wanted to get p5.js working with BLE to make a learning game with a light sensor to show night and Day in p5.js. I spent awhile trying to get it to work however I kept running into a SecurityError in p5.js and could not find a work around. No matter what example I tried the pop up to actually pair with my BLE in P5.js never showed up. I knew my BLE was working though because my code in arduino worked and would say that it was waiting to connect. I tried Scott’s tutorial, I tried Kathleen’s tutorial, I tried multiple other ones I found online. It just kept showing the error so I ended up expanding on my toothbrush teaching tool.

I originally wanted to add sound that would play to tell you how long you have been brushing for but my buzzer I think is broken since it didn’t even play a sound with just power and ground running through it. So sound was out. Because of that I decided to get creative with LEDs!

The idea was to show how long you maintain the same speed by increasing the amount of LEDs gradually over time if you are at the desired speed. The goal remains the same to keep the LEDs on as long as possible.

I started by wiring on a large breadboard to make troubleshooting easier.

Large Breadboard

I then decided to try to move everything to the smaller breadboard so that I could easily attach it to the toothbrush.

Smaller breadboard

This was tough to get working cause I had to make sure that nothing was touching each other and ran into a few issues because of that, that I had to troubleshoot as I worked.

I then decided to encase it when I attached it to the toothbrush. I was thinking about what materials I had that would be water resistent since it is going on a toothbrush and luckily found some plastic. Unfortunately it came out messier than I had anticipated since I didn’t have any clear tape so I had to use off white scotch.

Encased Design

Code

--

--