Merry Christmas for all M5Stackers and Scratchers !!
Christmas version demonstration video:
- Scratch Cat move like circle in M5S* display and Scratch.
- Scratch Cat want to get a giftbox from Santa Clause.
- You can control a giftbox with M5S* tilt (IMU accel).
- So you can help Scratch Cat for getting a giftbox!!
I develop M5Scratch for interacting M5Stack and Scratch 1.4 each other.
Scratch 1.4 has Scratch Remote Sensor Protocol (SRSP) which open and wait TCP/IP port 42001.
SRSP has two commands broadcast for sending message, and sensor-update for passing variable change.
You can use M5Stack functions for Scratch:
- Display
- Button switch
- internal IMU
- Keyboard, ten key, or game key at M5Stack Faces
- Internal LED at M5StickC
Short video for M5Stack.com
From M5S* to Scratch,
- (x, y): Scratch cat x-position and y-position.
- (r, g, b): color (r, g, b) for upper right corner circle and top line.
- t: Scratch cat heading degree.
- z: Scratch cat zoom value.
- l: LED on/off for M5StickC.
- s: some string.
From M5S* to Scratch,
- IMU accel (ax, ay, az)
- IMU gyro(gx, gy, gz)
- IMU magnetic(mx, my, mz)
- heading from magnetic
- temperature
- pitch, roll, yaw from IMU
- Button switch
- Keyboard, ten key or game key for M5Stack Faces
Ofcourse you can implement some more broadcast and sensor-update with Arduino IDE and Scratch.
The Scratch code is,
Please enjoy my project!!
Comments