chinsumochi (copy) — Aitewinrobot Esp32C3 Supermini simulation

An interactive Aitewinrobot Esp32C3 Supermini circuit simulation you can run free in your browser on Velxio, by hgducthanh.

Components

Sketch code

// DasaiMochi_ArduinoCode.ino — EDITED, no speaker/sound (2026-11-21)
// Source: https://github.com/maraulsav/Dasai-Mochi (Firmware/DasaiMochi_ArduinoCode.ino)
//   ESP32-C3 + SSD1306 128x64 I2C + TTP223 touch. Original had 2 animations:
//   normal (90 frames) and happy (98 frames), played with drawXBMP.
// Changes made in this copy:
//   - ALL sound removed: #include <driver/i2s.h>, setupI2S() (MAX98357A I2S
//     amp), playTone()/happySound() (ledc tone), SPEAKER_PIN, I2S pins.
//     NOTE: the original could not compile as-is: playTone() uses
//     BUZZER_CHANNEL, which is never #define-d anywhere, and there is no
//     ledc setup call. Removing the sound fixes that too.
//   - Pins adapted to the user's wiring (was SDA=4, SCL=5, touch=9):
//     SDA=8, SCL=9, touch=4. Display is SSD1306 I2C 0x3C, 128x64.
//   - Nothing else changed: all 188 frame bitmaps are byte-identical.
// Behaviour: no touch -> normal face loops; touch held -> happy face.
// Each frame: drawXBMP + sendBuffer, lasting exactly 40 ms counted
// from the START of the frame (polish 2026-11-21): the original waited
// delay(40) AFTER sendBuffer(), so each frame really took ~65 ms on
// I2C and the timing was uneven, which looks jerky. Counting from the
// frame start absorbs the ~20-25 ms send time.
#include <Arduino.h>
#include <U8g2lib.h> 
#include <Wire.h> 

// ================= PINS =================
#define PIN_SDA 8
#define PIN_SCL 9
#define TOUCH_PIN 4


U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(
  U8G2_R0,
  U8X8_PIN_NONE,
  PIN_SCL,
  PIN_SDA
);



// ==== NORMAL FACE ====
// '00', 128x64px
const unsigned char epd_bitmap_00 [] PROGMEM = {
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

More projects by hgducthanh