TapClock for WatchX

Why I got this error when I was trying to build the code

In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
from sketch/TapClock_v0.8.5.ino.cpp:1:
/Users/zachary/Documents/Arduino/libraries/i2cdevlib-MPU6050/MPU6050_6Axis_MotionApps_V6_12.h:138:54: error: conflicting declaration ‘const unsigned char dmpMemory [3062]’
const unsigned char dmpMemory[MPU6050_DMP_CODE_SIZE] PROGMEM = {
^
In file included from /Users/zachary/Documents/Arduino/TapClock_v0.8.5/TapClock_v0.8.5.ino:10:0:
/Users/zachary/Documents/Arduino/libraries/i2cdevlib-MPU6050/MPU6050_9Axis_MotionApps41.h:124:21: note: previous declaration as ‘const unsigned char dmpMemory [1962]’
const unsigned char dmpMemory[MPU6050_DMP_CODE_SIZE] PROGMEM = {
^~~~~~~~~
In file included from /Users/zachary/Documents/Arduino/TapClock_v0.8.5/TapClock_v0.8.5.ino:13:0:
/Users/zachary/Documents/Arduino/libraries/i2cdevlib-MPU6050/MPU6050_6Axis_MotionApps_V6_12.h:352:9: error: redefinition of ‘uint8_t MPU6050::dmpInitialize()’
uint8_t MPU6050::dmpInitialize() { // Lets get it over with fast Write everything once and set it up necely
^~~~~~~

I think the error is related with the Arduino IDE you are using. What is the version of your Arduino IDE? Recommendations:

  • Un-install the Arduino IDE and re-install it. If possible with a higher version number then the current one.
  • Try to upload the code on another computer.

Arduino 1.8.10
I think there are duplicated declaration in 6Axis and 9Axis h files, while you import all the 3 libs.

I have just gone through the i2c code and example

#include “MPU6050_6Axis_MotionApps_V6_12.h”
//#include “MPU6050.h” // not necessary if using MotionApps include file

It seems that you can only chose one lib from the MPU6050.h and the 3 MotionApps files.
The 3 MotionApps files seems to work for different chips.

I am happy that you sort it out;)

So why you include all the 3 MotionApps libs?
Which one should be left?

I can successfully compile the project by commenting 2 MotionApps .h files.
So the question now is, which one should be used?

Hi,
as this sketch uses (up from v0.5.7) the mpu6050 lib by jrowberg you need to remove the ArgeX MPU Lib from the libraries folder because of name conflicts.

Or, what I do,
I use a dedicated project folder only for my WatchX programming enviroment with the mpu6050 lib by jrowberg and only with the other needed libraries which are written down at the end of the readme.

Used Libraries
-watchX libs by ArgeX see http://watchx.io/downloads_en.html.
!! You need to remove the MPU6050 Library because of name conflicts !!
-I2CDEVLIB see https://github.com/jrowberg/i2cdevlib
-Bounce2 see https://github.com/thomasfredericks/Bounce2
-Pin Change Interrupt (PCINT) see https://github.com/NicoHood/PinChangeInterrupt
-SSD1306 Text Library see https://github.com/greiman/SSD1306Ascii
-DS3232RTC RTC Library see https://github.com/JChristensen/DS3232RTC
-Streaming by Mikal Hart see https://github.com/geneReeves/ArduinoStreaming fork of Mikal Hart’s streaming5.zip
-NewTone by Tim Eckel see https://bitbucket.org/teckel12/arduino-new-tone/wiki/Home

I hope this helps…

I wish all a hapy new year !

Thank you thank you thank you :star_struck::star_struck::star_struck::star_struck: I wish you all an amazing new year :slight_smile:

Does this have mblock file?
If yes where can I get one?

Hi, Tap clock available here Github You can upload the code using Arduino IDE. Let me know if you encounter any trouble while doing so.

Actually I wanted to add something in the code but I’m messing while using the Arduino IDE, basically I wanted to add a state where both LEDs are turned on as to use the watch as a source of light in dark.

Edit : I got through, now I have both LEDs turn-on on full power whenever I want.

Perfect:) It’s a cool need feature :slight_smile: You may consider adding a party mode to the LEDs :smiley:

Sure, I’m learning… can you advise me whether I should use Arduino IDE or mblock, as for my knowledge I’m a software engineering student and have a fair amount of experience in programming.

I highly recommend Arduino IDE. You can use scratch to see how we use certain components of watchX.

I would also like to use Arduino IDE, but I need documentation of libraries in reference to watchX hardware.

Here you can find detailed information about the sensors and components used in watchX: http://watchx.io/download/watchX%20User’s%20Manual%20-%20V1.1%20English%20A4.pdf

While designing the watchX we make sure that selected components have wide library and support on the internet. For example MPU6050 is the most common IMU used in DIY electronics, same for the BMP280 and MLX90393. Let me know if you need more information :slight_smile:

Currently my problem is program space I guess some library is using most of it, can you name that library please and any alternative to it with less space requirement?

Oled library is one of the libraries that uses most of the space. MPU and BMP libraries also take a lot of space if I remember correctly.

1 Like