Software apps and online services
I tried animating the eye of a bitmap image using the Micro OLED module and Visuino.Constitution
This module has 64×48 pixels OLED screen and an SPI or I2C interface. Details are below:
Various settings are possible by connecting the jumper on the board.
I set the communication method to I2C (BS1: 1, BS2: 0) and the I2C address to 0x3C (D/C: 0).Setting the Visuino
Connect Arduino with OLED module to PC with USB and start Visuino.
1. Arduino Uno components are deployed when Visuino starts up. To change the type of microcomputer click on the tool icon and select the microcomputer. Select the COM of the microcontroller connected at [Port:].
Placement and wiring of SSD 1306 components
2-1. Select the component on the right side Window [Displays] - [SSD 1306 OLED Display (I2C)] and place it.
2-2. Connect Reset of SSD1306 component to Arduino's D4 pin and I2C Out to I2C In.
Setting of bitmap image
3-1. Double-click the SSD1306 component to open the Elements window. Double click on Draw Bitmap in the Elements window so that bitmap image can be handled with SSD1306.
3-2. Select the Draw Bitmap, click [...] in Bitmap in the Properties window on the right to open Transparency Bitmap Editor.
3-3. Click [Load] in the Transparency Bitmap Editor and load the picture of the eyeball created with 64 x 48 pixels.
3-4. Select "tmcBlack" as the fill color in the Property window, enter 32 in X and 20 in Y so that eyeballs are displayed centrally. Also click on the thumbtack icon on the left of X to select Integer SinkPin so that X value can be entered externally.
Setting the Animation of image (X axis movement)
4-1. Select the component window on the right side [Integer] - [Sine Integer Generator] and place it.
4-2. Select Sine Integer Generator component, enter 32 in Amplitude, 32 in Offset and 0.2 in Frequency in the Properties window.
4-3. Connect Out of Sine Integer Generator component to Clock and X of SSD1306 component. The program is written to the microcomputer by clicking the [Send to Arduino]. With Position of the bitmap image changes with the integer (0 to 64) generated by the sine wave, then the eyeball moves in the X axis.
5-1. Double-click the SSD1306 component to open the Elements window. Double click the Draw Bitmap in the Elements window and load the eyelid image as well as the eyeball.
Eyelids are 64 x 48 pixels all black image.
5-2. Select "tmcNon" for Color in the Properties window of eyelid image and "tmcBlack" for Fill Color and enter 32 for X Also click on the thumbtack icon on the left of Y to select Integer SinkPin so that Y value can be entered externally.
5-3. Place the Sine Integer Generator component as well as the eyeball, enter 24 in Amplitude, -4 in Offset and 0.4 in Frequency in the Properties window Connect the Out of the Sine Integer Generator component to Clock and Y of the eyelid bitmap within the SSD1306 component.