In this project, I wanted to run a gif on the OLED screen, for this I converted different frames of a photo into code and entered it into coding in a smaller size. In this exercise, I used the old screen 128×64 and set the gif size to 30×30. In this way, it is possible not only to convert images into code, but also to display them in an animated form.
For this, from the beginning, I divided the GIF image file into 27 separate frames and changed the size. For this purpose, I used websites and free software such as IrfanView & ezgif.com and after that I converted the batch frames into code with javl.github.io/image2cpp weblink.
Code on Github: https://github.com/DehghaniMaryam/Create-Computation-Sketch5/commit/9536b98cd03288b1548245be5860dd28a67f18fd
As part of a major project I’m interested in moving and transforming origami, in this exercise I used a sensor to stop the swan movement. And I also used servo motor to make the swan dance in a specific angular range that could be change by Potentiometer used in the circuit.
Link to code:
In this sketch, I intended to provide the possibility of recognizing my body movements by using Google’s teachable machine learning tools so that a question mark appears on the screen when I raise my hand as a sign of question. Finally, I tried to make this question mark follow the movements of my body and be displayed exactly on my head, for this part I used PosNet.
P S: Maybe this code is more compatible with my face because I used pictures of myself for the machine learning.
In this code I tried to make a mask similar to a pumpkin on my face, which uses mesh on the face and uses the position of the eyes and mouth to place shapes. Considering that Halloween is coming, I hope you enjoy this code.
Link to Code
In the sketch, I tried to make the mouse look like an owl’s eye, when the mouse is clicked the background image turns black and the owl’s face appears so we can hear its sound.
Edit Link: https://editor.p5js.org/dehghani.maryam69/sketches/qYT-oOy7g
Here are the codes I use: