Arduino IDE environment - TimerCAM/UnitCAM

Driver Installation

Connect the device to the PC, open the device manager to install FTDI driver for the device. Take the win10 environment as an example, download the driver file that matches the operating system, unzip it, and install it through the device manager. (Note: In some system environments, the driver needs to be installed twice for the driver to take effect. The unrecognized device name is usually M5Stack or USB Serial. Windows recommends using the driver file to install directly in the device manager (custom Update), the executable file installation method may not work properly). Click here to download FTDI driver

For MacOS users, please tick System Preferences -> Security and Privacy -> General -> Allow downloadable apps from the following locations -> App Store and Approved Developer Options .

Arduino-IDE

Click here to visit Arduino official website , select the installation package corresponding to your own operating system to download.

M5Stack's board management

    1. Open the Arduino IDE, select File->Preferences->Settings
    1. Copy the M5Stack board management URL below to the Additional Development Board Manager:
https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
    1. Select Tools->Development Board:->Development Board Manager...
    1. In the new pop-up dialog box, enter and search for M5Stack, click Install (If the search fails, you can try to restart the Arduino program)
    1. Select Tools->Development Board:->Timer-CAM
    1. Select Project->Load library:->Manage library
    1. Search for Timer-CAM in the pop-up dialog box -> click Install
    1. File->Example->Timer-CAM Open the case program, modify the SSID and other information in the program according to the code comments, and compile and upload it to the device.
  • Copy the code below to the Arduino IDE, connect M5StickC to the PC and configure the correct port (Tools-> Port-> COMx), click the upload button (->) on the menu bar, the program will It will be automatically compiled and uploaded to the device. The program will start to control the blinking of the LED lights on the TimerCAM.

#include "battery.h"

void setup() {
  Serial.begin(115200);
  bat_init();
  pinMode(2, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(2, HIGH); 
  delay(1000);
  digitalWrite(2, LOW); 
  delay(1000);
}
On This Page