APRIL 12, 2022
Two shapes having anxiety
p5 libraries used: http://molleindustria.github.io/p5.play/
I decided to prototype a video gamesque controller that allows you to give anxious shapes more anxiety. Almost like a mating dance.
![Original p5 sketch uses mouse/keyboard input to animate](https://freight.cargo.site/t/original/i/318c7e93c8e0f9bc92dd5f0139baa0e4b25d5e83e997ca79b0f56c0f69df6962/Screen-Shot-2022-04-12-at-1.26.03-PM.png)
Motion Differentiation
What is a motion? When does the TinyML stop recording the gesture?
— what motions are too similar?
— what happns when one motion is a part of another motion?
— adjusting how fast should the training happen, when should it refresh to collect a new dataset for training
— getting motion to stop once the signal has been received once
I trained with roughly 40 instances each. Still, the motion-paths aren’t distinguished enough from each other properly, so sometimes it behaves at random.
I was frustrated and randomly named the motions “lo” (forward motion), “round” (circular) and “ee” (diagonal) in classic train-wreck-naming-convention fashion.
![](https://freight.cargo.site/t/original/i/caa3bcd64d99e7075152a2d3c0290744139edff2c05f29d8034605fbdab53da3/Screen-Shot-2022-04-12-at-1.28.02-PM.png)
![](https://freight.cargo.site/t/original/i/81f0a19e3e05315ee329ff1cdf432129c8fea59b308ced593ca3a52b5bc7d21a/Screen-Shot-2022-04-12-at-1.28.40-PM.png)
![](https://freight.cargo.site/t/original/i/b838c183392ae4684d7ff5ebd8bc4c0112505bb1dc5579474362ab970fa3c2d6/Screen-Shot-2022-04-12-at-1.28.50-PM.png)
Other qualms:
- It was tricky to get bluetooth to work at first. I finally felt in control of this project when the arduino light stopped blinking RGB and became a stable Blue.
This was after Scott turned my Bluetooth on/off, after trying other more complex ways to get to devices to pair.
Juggling a bunch of p5 libraries was also simply lovely, sometimes I was confused about the order in which the serial versus the draw stuff - should happen.
MARCH 29, 2022
Wekinator
I did get this one to work:
(Scott’s Max Patch)
https://youtu.be/XpskMdiP1eA
buuut the duck doesn’t really change. i can see the values changing but not sure where to view my output. The lolcalhost server won’t connect.
Finally got it to work! Turns you can’t simply open a patch with Max, copy pasting works better.
![](https://freight.cargo.site/t/original/i/96fd2c8fcaf9467c04d173c7839abdded0cda7edf7713407ae65c0c1df6e4307/Screen-Shot-2022-03-29-at-2.01.06-PM.png)
Fail #1
I used this word2vec plugn for Wekinator to give it input from the command line. This didn’t really work, I wasn’t sure where to observe the output. The local host server wouldn’t run.I will probably open an issue and see if I get a response.
![](https://freight.cargo.site/t/original/i/5d18bf9a28d6276c49d5bfc72ef131c2c64288fcaaecc9c57ae3a13b7eb4d277/Screen-Shot-2022-03-29-at-10.24.04-AM.png)
Fail #2
I tried the p5 tutorials next but it also had some components that weren’t responding. Not sure something has depreciated. Also, the recommended input and putput ports were 3333/3334 respectively, but the local host URL from the local live server didn’t reflect that. Not sure if that matters.https://github.com/genekogan/p5js-osc/blob/master/Applications.md
fwiw, Gene in these videos is running his p5 code locally, it doesn’t seem to work on the web editor.
![](https://freight.cargo.site/t/original/i/63934fa954d81497c32501ad8a9d8986a4d9e306407c3ae9fe62b767cf25da54/Screen-Shot-2022-03-29-at-11.33.48-AM.png)
![](https://freight.cargo.site/t/original/i/82eb322316b753a39c33e5916ff3edf303a9f573d4272aa8c8b8b8b2d70d3b98/Screen-Shot-2022-03-29-at-11.33.15-AM.png)
Fail #3
At this point I’m probably giving up too soon. I tried a max patch but couldn’t understand that input and output for audio. I should probably come back to this.
APRIL, 2022
Forager’s friend
I trained mymodel on some early spring flowers, both edible and toxic. I captured the flowers from a variety of angles, and labelled them.
![](https://freight.cargo.site/t/original/i/026bfd135c01eb200c9e014ce159176021561a5af3f29a62fdd6db69dc74e5bf/IMG_0895.jpeg)
![](https://freight.cargo.site/t/original/i/c0c4da5c2bfd8d14aab9a34b00b6125f59d0b1a8bbc17bb859e380e2e9f96dbc/IMG_0904.jpeg)
Fai
![](https://freight.cargo.site/t/original/i/04836f2977eefcde2d8cd2bccaa05a6285298fb7876366994cdcddd7ccca3c33/Screen-Shot-2022-03-11-at-4.55.27-PM.png)
Teachable Machine Link: https://teachablemachine.withgoogle.com/models/6-sQeA4nl/
p5 sketch:https://editor.p5js.org/tanvi/sketches/IdR7OB02q
I then classified the 9 samples as toxic and non toxic and mapped them to green and red LEDs respectively.
![](https://freight.cargo.site/t/original/i/9fc9d87003cda1b405323c2c77dcb49cdec751b14f5a04a8860353bca6aafe06/Screen-Shot-2022-04-24-at-7.53.47-PM.png)
![](https://freight.cargo.site/t/original/i/73a07be994dd834911a481a90296ffbf244b20943702d85d4da79e45ec612a93/Screen-Shot-2022-04-24-at-7.41.03-PM.png)
![](https://freight.cargo.site/t/original/i/eecdac26132b30ed03e41621e70713691905967e90d8b49f7d5e033610a0f717/Screen-Shot-2022-04-24-at-7.40.26-PM.png)
in action :
APRIL, 2022
🥨 Pretzels et al.
I trained my model on three shapes/gestures: Hourglass, Shuffle and Pretzel! Here is the documentation for pretzel, which was arguably the most complicated.
The ‘drawing tool’ is pretty low fidelity, something like a cat is identificable as a pretzel at best.
TIP: record more than you think you’ll need and clean. My sample set went from 130 -> 116 real quick.
![The starting points here are inconsistent, (in red), I found it hard to docus on the gesture rather than the final form.](https://freight.cargo.site/t/original/i/ea7e4047d7b7649210c245b61c7f478ea2c1d07c25c7c07ad633e9802b527791/Screen-Shot-2022-04-21-at-3.01.56-PM.png)
![](https://freight.cargo.site/t/original/i/4ca7c5a8c52e8c321848bd3e48029a58d18a96d34923694bb7fb674cf33267a6/Screen-Shot-2022-04-21-at-2.30.31-PM.png)
![](https://freight.cargo.site/t/original/i/fa96f6e305f978cf0a76957d186a1dc489a9888abae90a767c06bd556f5b2fb2/Screen-Shot-2022-04-21-at-2.30.07-PM.png)
![](https://freight.cargo.site/t/original/i/5b30a3f3bda3aac9525905a131378bf2af86140c54e48e92b9204601ee99cf47/Screen-Shot-2022-04-24-at-1.49.40-PM.png)
she’s perfect, but she’s hard to get right.
![](https://freight.cargo.site/t/original/i/f13bca7d810481c40e30a0bb93daaf29502d457e580f7093193b89ca578ea427/Screen-Shot-2022-04-24-at-1.34.26-PM.png)
![](https://freight.cargo.site/t/original/i/ccf8c55005f0b1e71f84e142a888df183e0cb8b0ca216f3d4087a916667b778a/Screen-Shot-2022-04-24-at-1.34.41-PM.png)
Initially, I was trying to do a Z instead of the Hourglass but I realised that it kept capturing my motion to reset my drawing gesture to the starting point at the end of one sample. I realised that closed shapes with the same starting and ending point might work better with our capturing system.
Error 1: I had some labelling issues too. Not sure why these happen, went into the JSON to fix.
![](https://freight.cargo.site/t/original/i/0af582c720f11ed95785e9da5c6a0c3ea44897d320b35e879c9ef60654803dd9/Screen-Shot-2022-04-21-at-2.44.40-PM.png)
Error 2: This was caused by running the Colab notebook on Safari! 🚫
![](https://freight.cargo.site/t/original/i/7283ebf70c31d3bd6fc15694ec7de44d3ae743f5518100b2dad18ef42cd16f5e/Screen-Shot-2022-04-21-at-2.57.10-PM.png)
Training
![Here is training for all three.](https://freight.cargo.site/t/original/i/611cbe8ab087cd0538f79999ba844da640fb154dd32a5541f4fa8e984e121979/Screen-Shot-2022-04-24-at-1.53.43-PM.png)
![Training for one goes smoothly.](https://freight.cargo.site/t/original/i/ac74ed76c2766458d3281dcce3904de91c4559d39221347640ccb59642d11c29/Screen-Shot-2022-04-21-at-3.06.30-PM.png)
![](https://freight.cargo.site/t/original/i/9d96dad454828ed07571d5a28d4d81463fbe8c75e88f394ef097ab79e303640d/Screen-Shot-2022-04-24-at-2.34.38-PM.png)
![](https://freight.cargo.site/t/original/i/f46d0029c33ce9d14fb621a946260c8c3a1659e143a476df859b78edd53b9166/Screen-Shot-2022-04-24-at-2.34.07-PM.png)
![A Pretzel!](https://freight.cargo.site/t/original/i/bd067a35e34f5000d6fd2ff87f752a8782c552227772205d3d14c84862c7a638/Screen-Shot-2022-04-24-at-2.34.18-PM.png)
![Not a Pretzel!](https://freight.cargo.site/t/original/i/47a3873ccdfbc6a851a41e946ffe083c6fc40487e7edbe4beafe465061367c55/Screen-Shot-2022-04-24-at-2.33.38-PM.png)
APRIL, 2022
Color detector
I am still working on getting the circuit right ...
I’m not a 100% sure how to configure the button. I’ll consult friends to understand whats wrong with my circuit right now.
I looked at this diagram to understand how to photocells connect.
![diagram for photocells](https://freight.cargo.site/t/original/i/204ed8c5741be0b1f15ceb8bbc44341e698604d665d2e1aba3e2f07e6d8953c5/light_cdslitetestdiag.gif)
![Is this what I should be following as the diagram for button?](https://freight.cargo.site/t/original/i/a0c4378a468ea89d0fa356d5b76545a7a9eadf9815100d6967b6a7ed49d0f457/arduino_button_sPXocpVv5F.png)
I’lll keep working on it.....
![](https://freight.cargo.site/t/original/i/4efe54ac12ffafaa6ff91e99da43c395f1ac8d970790100eb9d9a1199cc189c9/cover5.jpeg)
![](https://freight.cargo.site/t/original/i/54d47b53fb58bbaa27e3d59bf81421b3a7fc29a28918d1f33e9ab51bd493b6c9/IMG_1256.jpeg)
![](https://freight.cargo.site/t/original/i/b947ee8cb48c51a5a2452f56a9e844f06b2d885e75043a1588e0e50af374b4d3/IMG_1255.jpeg)