Closed brendonhatcher closed 4 years ago
i]I got your idea is pretty cool you want Otto to turn led by led every time you clap. ok i found out how to fix, basically the variable need to be converted, actually we had this already! somehow it did not appear in the installer release if you wanna give a try you can this:
Otto9Humanoid Otto;
int CLAPS = 0; const char data[] = "VARIABLE"; //9 characters MAXIMUM
void setup() { Otto.initMATRIX( DIN_PIN, CS_PIN, CLK_PIN, LED_DIRECTION); }
void loop() { CLAPS = CLAPS + 1; itoa(CLAPS, data, 10); // convert integer into a string so we can display this on the matrix Otto.clearMouth(); Otto.writeText ( data,50); // show the data with a fast scroll delay(1000); }
Like this it should work the variable, we would integrate this into the block for next release. Thanks
I created an int variable and declared it. I added the Mouth block and tried to connect the variable block to it. Instead of showing the number, the led matrix displays the name of the variable.
The variable is storing an integer value. If I use the Pixel X/Y block, I can use the value of the variable to input the X and Y coordinates.
The "S" in the attached image is Otto scrolling the word CLAPS