Advertisement
hwthinker

psram check hardware info esp32

Nov 24th, 2022
1,486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void print_chip_info(void)
  2. {
  3.     Serial.print("Chip: ");
  4.     Serial.println(ESP.getChipModel());
  5.     Serial.print("ChipRevision: ");
  6.     Serial.println(ESP.getChipRevision());
  7.     Serial.print("Psram size: ");
  8.     Serial.print(ESP.getPsramSize() / 1024);
  9.     Serial.println("KB");
  10.     Serial.print("Flash size: ");
  11.     Serial.print(ESP.getFlashChipSize() / 1024);
  12.     Serial.println("KB");
  13. }
  14.  
  15. // the setup function runs once when you press reset or power the board
  16. void setup() {
  17.   Serial.begin(115200);
  18.   Serial.println("Hello T-QT");
  19.   //print_chip_info();
  20. }
  21.  
  22. // the loop function runs over and over again forever
  23. void loop() {
  24.   Serial.println(" ");
  25.   print_chip_info();
  26.   delay(1500);                       // wait for a second                     // wait for a second
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement