
Save
Saving
ChrisWR
@ChrisWR
4
Reputation
20
Posts
2105
Profile views
0
Followers
0
Following
Posts made by ChrisWR
-
RE: Using CardKB (not hat) with M5StickC
#include <M5StickC.h> #include <Wire.h> #define CARDKB_ADDR 0x5F void setup() { M5.begin(); Serial.begin(115200); Wire.begin(); M5.Lcd.fillScreen(BLACK); M5.Lcd.setRotation(3); M5.Lcd.setCursor(1, 10); M5.Lcd.setTextColor(YELLOW); M5.Lcd.setTextSize(2); M5.Lcd.printf("IIC Address: 0x5F\n"); M5.Lcd.printf(">>"); } void loop() { Wire.requestFrom(CARDKB_ADDR, 1); while(Wire.available()) { char c = Wire.read(); // receive a byte as characterif if (c != 0) { M5.Lcd.printf("%c", c); Serial.println(c, HEX); // M5.Speaker.beep(); } } // delay(10); }
-
RE: How could I make text to speech using the speaker?
Try this for the M5stickC could work, ...
#include <M5StickC.h> #include <Arduino.h> #include <ESP8266SAM.h> //https://github.com/earlephilhower/ESP8266SAM #include <AudioOutputI2S.h> //https://github.com/earlephilhower/ESP8266Audio AudioOutputI2S *out = NULL; void setup() { out = new AudioOutputI2S(0, 1, 32); out->begin(); } void loop() { ESP8266SAM *sam = new ESP8266SAM; sam->Say(out, "Can you hear me now?"); delay(500); sam->Say(out, "I can't hear you!"); delete sam; }
-
RE: How could I make text to speech using the speaker?
This works on the M5stack, for the stickC I cannot test tho..
#include <M5Stack.h> #include <M5StackUpdater.h> #include <Arduino.h> #include <ESP8266SAM.h> //https://github.com/earlephilhower/ESP8266SAM #include <AudioOutputI2S.h> //https://github.com/earlephilhower/ESP8266Audio AudioOutputI2S *out = NULL; void setup() { M5.begin(); Wire.begin(); if(digitalRead(BUTTON_A_PIN) == 0){ Serial.println("Will load menu binary"); updateFromFS(SD); ESP.restart(); } out = new AudioOutputI2S(0, 1, 32); out->begin(); } void loop() { ESP8266SAM *sam = new ESP8266SAM; sam->Say(out, "Can you hear me now?"); delay(500); sam->Say(out, "I can't hear you!"); delete sam; }
-
RE: How to change LCD print text on runtime without creating another line
@andreaf said in How to change LCD print text on runtime without creating another line:
M5.Lcd.print("some text")
M5.Lcd.setCursor(xposition , yposition);
M5.Lcd.print("some text")or ;
M5.Lcd.drawString("some text"), xposition , yposition , txtsize);
-
RE: M5Stack Fire and M5 Piano?
get a proto and build the 15 pins female port in it..
-
RE: M5-bit (Micro-Bit) part 2
@ajb2k3 Its not uiflow, its makecode (for micro-bit) and arduino for m5