Found an earring I'll likely use: https://a.co/d/iFlPqK8
alternative option is to buy mini ornament balls and convert them into earrings: https://a.co/d/fnwCxcY or https://a.co/d/6tltePQ
These are 2 inches which is a good size: https://a.co/d/heBbKGr
Resources for the LEDs: https://www.adafruit.com/category/37 and https://learn.adafruit.com/category/leds
Likely RGB LED I will use (at least for prototyping): https://www.adafruit.com/product/2686#description
Microcontroller with built-in Wi-Fi ability (ESP8266 SMT Module - ESP-12F): https://www.adafruit.com/product/2491
For now, I'll stick to coin cell batteries (should fit in the ornament-sized earring): https://www.adafruit.com/product/654 or https://a.co/d/4NtyA9r
All parts should arrive next week, but in the meantime I want to practice coding with arduino
read this: https://www.arduino.cc/en/Guide & https://docs.arduino.cc/learn/starting-guide/whats-arduino & https://docs.arduino.cc/learn/starting-guide/getting-started-with-arduino-tools/
Resources referenced:
Use Addressable LED Strip with Arduino || Essential Engineering: https://www.youtube.com/watch?v=rPvGLSuMaLA
https://docs.arduino.cc/resources/pinouts/ABX00030-full-pinout.pdf
I tried to get the LED Strip to light up. Downloaded the Adafruit library and connected all the cables correctly (according to the tutorial I saw on connecting LED strips to Nano 33 BLE), but I couldn't get it to light up. I purchased some jumper cables so I can continue trying at home
On the plus side, I soldered onto the LED strip and (think) I did a good job!
Tutorial for "using the ESP8266 with neopixel LEDs (AKA the WS2812 or WS2812b), programmed via the Arduino IDE": https://www.instructables.com/ESP8266-controlling-Neopixel-LEDs-using-Arduino-ID/
AdaFruit resource for the microcontroller: https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/downloads
guide for the neopixels: https://learn.adafruit.com/adafruit-neopixel-uberguide/basic-connections
connecting through bluetooth with the Nano 33: https://docs.arduino.cc/tutorials/nano-33-iot/bluetooth/
I used jump rings and earing hooks, along with a set of jewelry pliers to connect the ornament filled with only cotton, which in the final version would have had a mini bluetooth microcontroller and RGB LED.
According to my mentor, tutor, and spiritual guide in this project - Lenny - , if my computer is connected through Wi-Fi to the microcontroller, because I only have one Wi-Fi chip on my computer, it won't be able to connect also to 'functional/usable' Wi-Fi to browse websites. So we're back to Bluetooth. It's helpful that the chip I rented from the shop, the Nano 33 IoT, has Bluetooth connectivity so that's the one we're working with.
Traffic lights are universally understood and easy to interpret. I don't need to tell someone Red means "stop". The design would be really cool, and technically doesn't require RGB LEDs, rather just 3 unicolor LEDs as each light. I found some free 3D models of stoplights that were adorable, and I think I could turn it into a hanging earring. The microcontroller could go on the back. I still need to figure out the power source, but for now I can wire it to a small battery pack that I attach to my shoulder.
These are the two designs I found that I want to try working with. I'll likely print both and see what fits best
Where "we" is my partner Lenny and me, because I did all this with him sitting next to me and helping me troubleshoot the entire time. I cannot credit nor thank him enough.
Aka: getting the LED to turn on
Downloaded the ArduinoBLE Library & used this guide, as well as Lenny's help. We went to the ArduinoBLE library's examples page, periphery, then LED. I audio-recorded his guiding me through this part: https://drive.google.com/file/d/1fGhjyWkpfP5kyl4mV1IV0EAySGTYWUs_/view?usp=drive_link
Open inspect
go to console
code to find website is: document.location.host
We wrote in-line JavaScript into the console to connect to the bluetooth device and send the signal of an integer. For testing, we just sent a specific integer (constant), rather than converting the website into its matching integer. This worked! However, it required to re-select the bluetooth device every time I loaded a new page, since it would reset and have to be reinserted.
This was intrusive and annoying, and since I'm the one using this, I knew for a fact I would get annoyed quickly if I had to repeatedly find and connect to the earring every time I switched websites (which is often). I knew it had to run in the background if this was going to be actually functional in any aspect.
We attempted to fix the need to reconnect every time by creating a chrome extension with the same function as the in-line Java. This wasn't working, likely because bluetooth may not be supported by extensions on chrome anymore; at least in a way that didn't have to be reinstalled on every unique page.
We then attempted to communicate with the bluetooth device (the Nano 33 IoT) via Python, which worked on Lenny's Linux computer, where we were testing the code.
Next, we added a web server (in simple words, something that can communicate between programs over the internet), an HTTP request, to the Python code. We made a simple Chrome extension that would just send the current URL over to the Python script.
Once the URL got to the Python script, it would be converted to its matching integer based on a map (Python dictionary). Then, we had to get it to send the integer to the Nano 33 IoT through Bluetooth. It took a while to find the right library since Mac has different support, but we were able to get the Python script to send the integer via Bluetooth (when the Nano wasn't connected to one of our phones or the other's computer, which tripped us up a couple times).
Manifest: tells Chrome what it is and what permissions to allow
Background: The Script
(because I made it without a lot of Lenny's help) (should change some pin names but we'll get there later)
The code works great when you type a new URL, but not when you reload a page or change a tab. We need to fix this.
Nov. 20th: purchasedthe XIAO ESP32C3 microcontroller https://www.amazon.com/gp/product/B0B94JZ2YF/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 for a total of $10.78
Wasn't sure how to 'overlap' the cables, but wanted to put the micrcontroller on the back of the earring.
Some lessons:
Since it needs to be plugged in to work, I needed the USB C charging port to face the bottom.
Moving around insulated tape is difficult
I first connected the LED's to the resistors (figured out the ohms based on the LED info that came in the kit and math) by clipping and soldering them. On the other side of the resistor, I used jewelry tweezers to curve the wire around the pin (I was scared to solder onto the board)
For the ground, I stripped a wire, curved it into the GND pin, and then used hot glue to make sure it stayed in place on the stoplight model. Then, I soldered the negative ends of the LED to the stripped wire.
THEN, I noticed my microcontroller wasn't at all attached to the stoplight, so I used hot glue to connect it (yes I thought all my wires would break and the GND cable would disconnect from the earring, but only the red LED solder broke, which I fixed and then had to fix again)
The bluetooth was working perfectly on the phone (as is shown in the video to the right), but was spitting out errors on the Python code on the computer.
Lenny helped me figure out the correct UUID of the microcontroller using bleak in python, and we modified the code accordingly, which (thankfully) fixed the problem!
Design feedback:
The hanging method made the stoplight spin, which people didn't like.
A couple people tried on the earring and were surprised at how light it was.
Someone suggested using a small battery pack and shirt with front pocket to provide battery for the earring.
People agreed with me that the light would look better if it was diffused. Someone suggested parchment paper but I had already tried and ruled that out.
Electronic/Components feedback:
Someone suggested using a coin battery with a holder in a new version to make the earring wireless (it's only wired for battery). I think it would be a good idea if my 3D model was hollow, to hide the battery inside.
Someone offered help to solder the wires to the ESP32C3 since the light would sometimes turn off. It hadn't turned off when I was trying it at home, but all the movement in playtesting must have made it less stable. I thanked them but refused the offer since I have already been practicing soldering.
Comments:
I originally felt like my project was too brittle and the wiring/components were too visible. In other words, I didn't like the aesthetics of the earring, even though I did like the stoplight design. People complimented my earring and, when I brought up my concerns, they said it looks very good and would be easy to hide the electronic components in a second version. I also saw other people's presentations and was reassured, noting that most people's projects had unfinished / unpolished designs and visible mechanisms.
People were more concerned about the weight of the earring than I had originally expected. Because I'd been working with the materials for so long, I already knew the weight wouldn't be a problem, but beyond that, there's many other practical reasons I can't wear the device in the stage it's at- starting with the brittle soldering barely holding each joint together and the fact that the earring needs an external battery to function. When I mentioned the impracticality of wearing due to the battery, the person I was speaking to said I could just plug it in to my laptop. I did put on the earring and plug it in, and I think the cable would be too distracting while studying. This gave me the idea of possibly making the new version a desk-top companion, sitting next to my computer rather than on me.
I wanted people to try the device to see which websites they would visit, so I could add them to my code, but because the bluetooth wasn't working correctly at this point, no one was able to try it and I couldn't get a website list.
Used hot glue on parchment paper to create discs to diffuse the light on the earring
I soldered all the wires to the microcontroller. It was previously just wrapped around the pins.
When playtesting, classmates requested to see the earring on / wear the earring. I noticed that it spins when on the ear, which was annoying me.
Unfortuantely, I only had the specific earring hooks and jump rings. I took a needle from an old emergency sewing kit and dipped the sharp tip in hot glue to blunt the needle since I don't have sandpaper or a metal-cutter at home. I then replaced the jump ring with the needle and realized my hole was too shallow and the needle too big, so it looked weird.
I was going to give up but then I remembered I have a bunch of cheap old earrings from Claire's, so I glued one on and am PRAYING the hot glue doesn't fall off.