QRCode.ino 1.0 KB

12345678910111213141516171819202122232425262728
  1. /*
  2. *******************************************************************************
  3. * Copyright (c) 2022 by M5Stack
  4. * Equipped with M5Core sample source code
  5. * 配套 M5Core 示例源代码
  6. * Visit for more information: https://docs.m5stack.com/en/core/gray
  7. * 获取更多资料请访问: https://docs.m5stack.com/zh_CN/core/gray
  8. *
  9. * Describe: QRcode. 创建二维码
  10. * Date: 2021/7/26
  11. *******************************************************************************
  12. */
  13. #include <M5Stack.h>
  14. void setup() {
  15. M5.begin(); // Init M5Stack. 初始化M5Stack
  16. M5.Power.begin(); // Init power 初始化电源模块
  17. M5.Lcd.qrcode(
  18. "http://www.m5stack.com", 0, 0, 150,
  19. 6); // Create a QR code with a width of 150 QR code with version 6 at
  20. // (0, 0). 在(0,0)处创建一个宽为150二维码版本为6的二维码
  21. // Please select the appropriate QR code version according to the number of
  22. // characters. 请根据字符数量选择合适的二维码版本
  23. }
  24. void loop() {}