I assume that I a am not the first one to ask, but how can I select other fonts? Thanks
Best posts made by HappyUser
-
Core-Ink --> Any other fonts available besides the two included
-
Atom Echo. Format and create sound file
I have been googling around, no understandable answers found. But I am sure I am not the only one with this interest.
Could anyone explain the binary format of the sound stream used in the echo? And also nice to have : howto proces a mp3 or wav file into the required binary array to be used in the Echo?
Thanks. -
RE: STAMP CATM does not respond (Solved, HTML Get and Send Email)
@happyuser
A few tips who want to start with this module:
1] Remove PIN code, makes life much easier
2] Download the application notes for this module. Both the complete AT instruction set and the note on HTTP application. This document provides clear instructions how to use HTTP, GET, POST etc
3] I experienced ERROR response on SHCONF command. Googled around, saw numerous hits. It appears that switching off and on power does the trick for me. I did not see a reset AT instruction
4] I got it all working with these instructions :
Serial.println("Begin..");
//pinMode(RXD2, INPUT);
//pinMode(TXD2, OUTPUT);
//showLog("Reset Module...");
//SIM7020
//DTU.Init(&Serial1,36, 26);
//Serial1.begin(115200, SERIAL_8N1, RXD2, TXD2);
//Serial1.begin(115200, SERIAL_8N1, 26, 0);
Serial1.begin(115200, SERIAL_8N1, 0, 26); // SIM7080Gdelay(300); //Serial1.print("ATI\r\n"); //Serial1.println("AT+CSQ\r\n"); //Serial1.println("AT+IPR?\r\n"); Serial1.print("ATZ\r\n"); // Reset to default delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+IPR=115200\r\n"); // Reset to default delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CCLK?\r\n"); // Reset to default delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHSSL=1,\"\"\r\n"); // Reset to default delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CFUN=1\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CMGF=1\r\n"); // text mode delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500);
// Om http te testen
Serial1.print("AT+CFUN=0\r\n"); // Disable RF delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); //Serial1.print("AT+CGDCONT=1,\"IP\",\"internet\",,0,0\r\n"); // Serial1.print("AT+CGDCONT=1,\"IP\",\"internet\"\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CFUN=1\r\n"); // Enable RF delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CGATT?\r\n"); // Check PS Service delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CGNAPN\r\n"); // Query the APN service delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CNCFGN=0,1,\"internet\",,0,0\r\n"); // Before activation please delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CNACT=0,1\r\n"); // Activate delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CNACT?\r\n"); // Query the APN service delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHCPARA\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHCONF=?\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHCONF?\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500);
// Serial1.print("AT+SHCONF="URL","https://api.thingspeak.com/update"\r\n"); // Query the APN service
//Serial1.print("AT+SHCONF="URL","httpbin.org"\r\n"); // Query the APN service
//Serial1.print("AT+SHCONF="URL","http://34.193.132.77"\r\n"); // Query the APN service//SIM7600_Error=1; //for (int i=0;i<10;i++) // { //Serial1.print("AT+SHCONF=\"URL\",\"http://www.google.com\"\r\n"); // Query the APN service Serial1.print("AT+SHCONF=\"URL\",\"http://www.httpbin.org\"\r\n"); // Query the APN service delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(2000); // if (SIM7600_Error=0) {break;} // } Serial1.print("AT+SHCONF=\"BODYLEN\",1024\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHCONF=\"HEADERLEN\",350\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHCONN\r\n"); // Query the APN service delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHSTATE?\r\n"); // Query the APN service delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHCHEAD\r\n"); // Query the APN service delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHAHEAD=\"User-Agent\",\"curl/7.47.0\"\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHAHEAD=\"Cache-control\",\"no-cache\"\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHAHEAD=\"Connection\",\"keep-alive\"\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHAHEAD=\"Accept\",\"*/*\"\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHREQ=\"/get?user=jack&password=123\",1\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SHREAD=0,391\r\n"); // delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500);
-
RE: M5 paper reading google sheet
@paulpattyn Uh, how about use Google : https://www.instructables.com/Post-to-Google-Docs-with-Arduino/
Regards -
RE: ATOM Lite Display not display in smallHd 503
@cepics said in ATOM Lite Display not display in smallHd 503:
SmallHD503 datasheet
I read that you are also struggling with this (5 inch?) display. I am facing the same issues with Waveshare 5inch display. Although I have the very strong feeling that the software on the M5AtomDisplay as shipped is different from the GitHub factory test. Have you been able to get things working?
-
RE: SIM7080G CAT-M/NB-IoT+GNSS Unit Issues
#include <HardwareSerial.h>
HardwareSerial Comm(1);Comm.begin(115200, SERIAL_8N1,TX_pin,RX_pin); // TX RX
Comm.print("AT+IPR=115200\r"); // Set text mode
Last command should return an OK. If not, it could be that you have mixed up TX and RX pins or a power issue.
To read the reply from the module you could use something like this :
while (millis()<wait_until)
{
while (Comm.available())
{
ccc=Comm.read();
//Serial.print(ccc);
if (k<buffer_size-1)
{
Receive_buffer[k]=ccc;
k++;
}
}
Receive_buffer[k]=NULL;
if (strstr(Receive_buffer,StopCharArray)!=NULL)
{
//Serial.println("OK found");
// SIM7600_Error=0;
Receive_buffer[k]=NULL;
return false;
}
} -
RE: STAMP CATM does not respond (Solved, HTML Get and Send Email)
Okay, Had a lot of <bad language> getting sending email working.
Than I realized that powering the module straight from the M5StickC appeared to causes glitches. I have placed a capacitor on top of the 5Volt to the module and now I am able to send emails also. For those that are interested, here is the code (with a lot of overhead no doubt, that works for me ):
Serial1.begin(115200, SERIAL_8N1, 0, 26); // SIM7080Gdelay(300); //Serial1.print("ATI\r\n"); //Serial1.println("AT+CSQ\r\n"); //Serial1.println("AT+IPR?\r\n"); Serial1.print("ATZ\r\n"); // Reset to default delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CREBOOT\r\n"); // Reset to default delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500);
/*
Serial1.print("AT+CMEE=2\r\n"); // Verbose error printing ??
delay(10);
Read_Response_OK(5000);
Serial.println(Receive_buffer);
delay(500);
*/Serial1.print("AT+IPR=115200\r\n"); // SetTE-TAFixedLocalRate delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CCLK?\r\n"); // Clock delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500);
// Upload a file
Serial1.print("AT+CFSINIT\r\n"); // Clock delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500);
String Command_Str;
Command_Str="AT+CFSWFILE=0,"0001.txt",0,";
Command_Str=Command_Str+FileSize;
Command_Str=Command_Str+",10000\r\n";
Serial.println(Command_Str);Serial1.print(Command_Str); delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); for (int i=0;i<FileSize;i++) {Serial1.print(jpg_small[i]);} Serial1.print("AT+CFSGFIS=0,\"0001.txt\"\r\n"); // delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CPIN?\r\n"); // Ccheck SIM delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CSQ\r\n"); // Check signal delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CFUN=0\r\n"); // Set Phone Functionality isable RF delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); //Serial1.print("AT+CGDCONT=1,\"IP\",\"internet\",,0,0\r\n"); // Serial1.print("AT+CGDCONT=1,\"IP\",\"internet\"\r\n"); // Define PDP Context delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CFUN=1\r\n"); // Set Phone Functionality Enable RF delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CGATT?\r\n"); // Attach or detach from GPRS service delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CGNAPN\r\n"); // Get Network APN in CAT-M or NB-IOT Query the APN service delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CNCFGN=0,1,\"internet\",,0,0\r\n"); // Before activation please delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CNACT=0,1\r\n"); // APP Network Active Activate delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+CNACT?\r\n"); // APP Network Active Activate Query the APN service delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+EMAILCID=0\r\n"); // Set parameters of email delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+EMAILTO=30\r\n"); // Set parameters of email time out delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500);
/*
Serial1.print("AT+EMAILSSL=2,0,"email.cer","email.pem"\r\n"); // Set Encrypted mail
delay(10);
Read_Response_OK(5000);
Serial.println(Receive_buffer);
delay(500);
*/
// https://randomnerdtutorials.com/esp32-send-email-smtp-server-arduino-ide/Serial1.print("AT+SMTPSRV=\"smtp-mail.outlook.com\",587\r\n"); // Set SMTP server delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500);
//SMTP Password: (you need to use a Google App Password, not your Gmail password!)
//https://support.google.com/accounts/answer/185833
// https://www.hesk.com/knowledgebase/index.php?article=72Serial1.print("AT+SMTPAUTH=1,\"my.email.com\",\"myApppassword\"\r\n"); // Set username and password
delay(10);
Read_Response(5000);
Serial.println(Receive_buffer);
delay(500);Serial1.print("AT+SMTPCS=\"ASCII\"\r\n"); // Set Email SSL function delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+EMAILSSL?\r\n"); // Read Email SSL function delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+EMAILSSL=2,0,\"\",\"\"\r\n"); // Set Email SSL function delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+EMAILSSL?\r\n"); // Read Email SSL function delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SMTPFROM=\"my.email@outlook.com\",\"Fakename\"\r\n"); // Set username and password delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SMTPRCPT=0,0,\"Sendto@mac.com\",\"john\"\r\n"); // Set recipient To: delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500); Serial1.print("AT+SMTPSUB=\"Test4\"\r\n"); // Set recipient Bcc: delay(10); Read_Response_OK(5000); Serial.println(Receive_buffer); delay(500);
String Email_Body="This is a new Email";
int Body_size;
Body_size=Email_Body.length();
Serial.print("Body size is :");
Serial.println(Body_size);Serial1.print("AT+SMTPBODY=19\r\n"); // Set recipient Bcc: delay(10); Read_Response_OK(5000); //Serial.println(Receive_buffer); //delay(500); Serial1.print(Email_Body); //Serial1.print("\r\n"); delay(10); Read_Response(5000); Serial.println(Receive_buffer); delay(500);
char ccc;
Serial.println("AT+SMTPSEND");
Serial1.print("AT+SMTPSEND\r\n"); //
delay(10);
while (Serial1.available())
{
ccc=Serial1.read();
Serial.print(ccc);
}/*
Read_Response(5000); //Geen OK
Serial.println(Receive_buffer);
delay(500);
*/
Serial.println("And we are done");
while (1) {delay(300);} -
RE: Remote Sensing with Core2 (UIFlow) via LORA Point-to-point
Interesting question. M5Stack provides P2P LoRa example along with their documents. My suggestion is to make a proof of principle what you need. Then try the max achievable distance. Mqtt is another challenge but also many examples on GitHub.
-
RE: STAMP-C3 problem with Serial2
Solved
I don't why I have been klinging on to Serial2, it got me in all kind of testing out, but the solution is to use Serial 1. -
RE: RFID 2 unit and I2C hub 1 to 6 expansion unit
@laursena please check the version of ClosedCube.cpp and ClosedCube.h you are using. The one that is provided by M5stack is the newest.
(* In the examples of M5StickCPlus in the directory Unit/PaHub you may find these documents. *)
Latest posts made by HappyUser
-
RE: M5 paper reading google sheet
@paulpattyn Uh, how about use Google : https://www.instructables.com/Post-to-Google-Docs-with-Arduino/
Regards -
RE: Unit cam S3 : .ino files , where to find
@kuriko Thank you. I would have hoped that they also supply Arduino code.
-
Unit cam S3 : .ino files , where to find
Hi there,
I was wondering, where can I find software, for example the firmware, that I can open directly in the Arduino development software. I have found the GitHub page but I don’t see any .ino files.
Thanks. -
RE: RFID 2 unit and I2C hub 1 to 6 expansion unit
@laursena please check the version of ClosedCube.cpp and ClosedCube.h you are using. The one that is provided by M5stack is the newest.
(* In the examples of M5StickCPlus in the directory Unit/PaHub you may find these documents. *) -
RE: RFID 2 unit and I2C hub 1 to 6 expansion unit
SOLVED : After remeniscing abount my life, and specifically what goes wrong here, i just realised : could it be that I am using an outdated library of ClosedCube. And yes, after using the version from 4 April 2023, everything works fine now.
@felmue In Dutch : Krijg nou wat?
I put the RFID 2 module in slot 1 of the TCA 9548A module and then in channel 0 (weird because i have placed it in channel 1) i see address 0x28 of the RFID popping up.Does this mean that channel 0 on the module is not usable?
ThanksIn follow_up , I have checked ClosedCube_TCA9548A.cpp and the selctChannel goes like this :
uint8_t ClosedCube::Wired::TCA9548A::selectChannel(uint8_t channel) { uint8_t result = 0xff; if (channel < TCA9548A_MAX_CHANNELS) { Wire.beginTransmission(_address); Wire.write(((uint8_t)1) << (channel)); _currentChannel = channel; result = Wire.endTransmission(); } return result; }
That seems to be correct if I read the documentation of the Texas Instrument module TCA9548A
I am really misunderstaning something or could it be that their is somekind of wire mixup in the module?
Btw, I also dont see a reset channel somewhere in the code.
Now i did another experiment using PCA9548AP (the newer version).
Plugging in the RFID in channel 0 gives no response.
Plugging in channel 1 : software tels me the device is in channel 0
Plugging in a second RFID in channel 2 :software tells met a I have another device in channel 1.I tried to increase the max number of channels to 8 (assuming that channel 0 is somehow connected to channel 7 of 8). Still no response when i attach a device physically on channel 0.
This is really weird behaviour. I hope someone is at least able to reproduce this behaviour.
-
RE: M5 Unit Scroll Arduino Example
@cepics Have you checked whether M5UnitScroll.begin returns true? Baybe that gives a clue.
Regards -
RE: RFID 2 unit and I2C hub 1 to 6 expansion unit
@felmue Sorry for my late response, been a bit occupied. Tried exacltly the include code with the most recent version of M5Unified (0.2.1) and M5Stack board manager (version 2.1.2). Connect the RFID 2 unit to slot 0 of the TCA9548A module (boh M5Stack products.
It only lists for each channel 0x70 wire ping value. I would have expected for channel 0 to have a response on 0x28 (native wire address of the RFID 2 module). Maybe it is because the RFID module has not been inititated yet. But I do not know where to put the init of the RFID module. Tried at different place in the code , to no avail. I hope someone has an idea of where I am going wrong here.```
//#include <M5Core2.h>
#include <M5Unified.h>
#include <Wire.h>#include "ClosedCube_TCA9548A.h"
#define FRONT 2
#define X_LOCAL 100
#define Y_LOCAL 35
#define X_OFFSET 160
#define Y_OFFSET 34#define PaHub_I2C_ADDRESS 0x70
ClosedCube::Wired::TCA9548A tca9548a;
void setup() {
M5.begin();
Wire.begin();
tca9548a.address(PaHub_I2C_ADDRESS); // Set the I2C address. 设置I2C地址
M5.Lcd.setTextFont(4);
M5.Lcd.setCursor(70, 0, 4);
M5.Lcd.setTextColor(YELLOW, TFT_BLACK);
M5.Lcd.println(("PaHUB Example"));
M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK);
}void loop() {
uint8_t returnCode = 0;
uint8_t address;
for (uint8_t channel = 0; channel < TCA9548A_MAX_CHANNELS; channel++) {
M5.Lcd.setCursor(X_LOCAL, Y_LOCAL + Y_OFFSET * channel, FRONT);
M5.Lcd.printf(
" ");
M5.Lcd.setCursor(X_LOCAL, Y_LOCAL + Y_OFFSET * channel, FRONT);
M5.Lcd.printf("CH%d : ", channel);
returnCode = tca9548a.selectChannel(channel);
if (returnCode == 0) {
for (address = 0x01; address < 0x7F; address++) {
Wire.beginTransmission(address);
returnCode = Wire.endTransmission();
if (returnCode == 0) {
Serial.print("I2C device = ");
M5.Lcd.printf("0X%X ", address);
}
}
}
delay(200);
}
} -
RFID 2 unit and I2C hub 1 to 6 expansion unit
Hello,
The RFID 2 unit works fine when connected directly to M5Core2.
Now, I connect the I2C hub to the M5Core 2 and connect the RFID 2 device to channel 0 of the I2C hub.
I run the following programs. I would assume that the RFID 2 device would show with address 0x28. But it does not, it only gives 0X70 which is the I2C device itself. What am i missing here?#include <M5Core2.h> #include "ClosedCube_TCA9548A.h" #define FRONT 2 #define X_LOCAL 100 #define Y_LOCAL 35 #define X_OFFSET 160 #define Y_OFFSET 34 #define PaHub_I2C_ADDRESS 0x70 ClosedCube::Wired::TCA9548A tca9548a; void setup() { M5.begin(); //M5.Power.begin(); //wire.begin(); tca9548a.address(PaHub_I2C_ADDRESS); // Set the I2C address. 设置I2C地址 M5.Lcd.setTextFont(4); M5.Lcd.setCursor(70, 0, 4); M5.Lcd.setTextColor(YELLOW, TFT_BLACK); M5.Lcd.println(("PaHUB Example")); M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK); } void loop() { uint8_t returnCode = 0; uint8_t address; for (uint8_t channel = 0; channel < TCA9548A_MAX_CHANNELS; channel++) { M5.Lcd.setCursor(X_LOCAL, Y_LOCAL + Y_OFFSET * channel, FRONT); M5.Lcd.printf( " "); M5.Lcd.setCursor(X_LOCAL, Y_LOCAL + Y_OFFSET * channel, FRONT); M5.Lcd.printf("CH%d : ", channel); returnCode = tca9548a.selectChannel(channel); if (returnCode == 0) { for (address = 0x01; address < 0x7F; address++) { Wire.beginTransmission(address); returnCode = Wire.endTransmission(); if (returnCode == 0) { Serial.print("I2C device = "); M5.Lcd.printf("0X%X ", address); } } } delay(200); } }
-
RE: Atomic CAN Bus and Wifi
@kuriko
Indeed a strange situation.
It occurs if I use TX=26 and RX=32 and also TX=22 and RX=19 to initiate the can BUS on a M5Atom
ESP32Can.CANInit(); // Init CAN Module. 初始化CanIf i dont initiate WifI I can send data through the CAN BUS. The moment I initiate WiFi, no data come through in the CAN BUS.
I will do some other trials with other devices (M5Core 2 and M5Atom S3) to check if it is a hardware problem.
I do hope to get this solved because if this problem is definite it means the Communication abilites of the CAN bus are limited.
Regards(* Oh, important : When using WiFi i do receive CAN BUS messages , so that is weird, i really need to dive into this*)
-
RE: Atomic CAN Bus and Wifi
@kuriko I use Arduino.
I am curious if this is a hardware issue or software (incompatibility between Wifi and the CAN bus protocol).
It does not work with ports 26 and 32 as well as ports 22 and 19 for communication with the CAN bus port
Regards