1830 0
Production process


Use mCookie to build a simple watch.



Acquire time via RTC module and display time on the OLED screen.



ModuleNumberFunctionmCookie-CoreUSB1Core boardmCookie-RTC1Clock modulemCookie-OLED1Display screenMicroduino-BM1Battery management



  • Setup 1:Connect CoreUSB with your PC/MAC with a USB cable and open Arduino IDE.

CoreUSB Ble pc.jpg
  • Setup 2:Click file > Examples > mCookie > _202_mWatch and load program.

L mWatch-ino.jpg
  • Setup 3:Load the code and copy the program code to IDE. Select the right board and COM port for program download after compiling.


Program Description

  • ” draw()” function is OLED display interface and it displays characters with a few steps:
  • Set font
  • Set font coordinate place
  • Print characters to be displayed
  • setRtcTime() is time setting function. For example setRtcTime(15, 5, 18, 1, 10, 22, 33) presents 33 seconds at 10: 22 on Monday, 18, May, 2015.

void setRtcTime (byte _year, byte _month, byte _day, byte _week, byte _hour, byte _minute, byte _sec){//clear out all the registers rtc.initClock(); rtc.setDate(_day, _week, _month, 0, _year); rtc.setTime(_hour, _minute, _sec);}

Code Debugging

Find this code section and set the initial time of the RTC module. Re-load the code to CoreUSB after setting.

setRtcTime(15, 5, 18, 1, 00, 00, 00);
Enter “//” before this code section after loading the program, the whole section will turn gray and then re-load the program and you’ll see RTC can time automatically. (“//” means “comment out the program code and do not perform “. In this way, you needn’t run the program after calibration or the system will need re-set time after power-fail and re-start. )

//setRtcTime(15, 5, 18, 1, 00, 00, 00);

Hardware Buildup

  • Setup 1:Connect the activated battery box and BM module.

CoreUSB Ble steup2.jpg
  • Setup 2:Stack all modules together without fixed order and finish circuit buildup.

MWatch steup3.jpg


The first line shows data and week. The second line displays: time and the third displays custom text.

Legao mWatch.jpg

Required hardware
No data
Code show
No data
Attachment download
No data
Asset info

Creation time:11/08/2018

Asset recommendation
No data
Course recommendation
No data
Master, don't look at it silently. Please login to help me comment.

Register now