My watch just can't connect to the PC, don't know why

hey guys,
I am a Chinese new user and I just bought the watchx. Then I follow the manual and upload the source into it from the link below:

when I finished, I found some tiny problems such as there is just one car dodeg game but not two, and some display problems.

But the big one is when I connect the watch to the usb port of my PC in sleep mode, the PC juct could’t find the device. Then when I push the button to wake it up, the PC find the device and there will be a usb connecting icon shown on the screen. But after a while the device will disconnect automatically. Now I couldn’t upload any code into the device and the log always shown like this:

sketch\pwrmgr.c:13:26: warning: extra tokens at end of #undef directive

#undef sleep_bod_disable()

                      ^

C:\watchx\NWatch-master\watchX\watchX.ino:7:16: warning: extra tokens at end of #undef directive

#undef millis()

            ^

项目使用了 28504 字节,占用了 (99%) 程序存储空间。最大为 28672 字节。
全局变量使用了1518字节,(59%)的动态内存,余留1042字节局部变量。最大为2560字节。
avrdude: ser_open(): can’t set com-state for “\.\COM4”
上传项目出错

Can someone help? Thanks a lot!

嘿,这个固件有问题,我之前做了一个修复的版本,而且添加了一些小功能,但是kghunt这里还没有更新,推荐你仔细了解一下这个代码,这个代码来自于Zak Kemble的DIY N|Watch项目,是来自于ATMEL STUDIO,由一位日本大神花了很多精力移植到了Arduino平台,他的网站上已经有了很多改进的版本了,不知道那个账号为什么还没更新。只有一个游戏是故意设置的,zak的N|Watch用的m328p芯片,bootloader要比watchX的arduino Leonardo小,所以可以同时运行两个游戏,我在我的改进版里边已经做了必要的修改,现在仍是默认的car game, 但是也可以运行那个breakout游戏,但是要禁用掉很多功能。可以在config.h里边具体设置。这个版本当检测到USB连接到计算机的时候是不会休眠的。


我的版本 点击此处
但是注意,上传这个之前,因为这里使用了EEPROM存储了一些位图,所以要到原作者sasapea那里下载,这里是网址 点击此处下载EEPROM配置文件


Lawrence

大神!多谢,我还有几个问题想请教一下:
1、你的包里买有arduino的启动文件,需要怎么安装呢?不好意思我是个小白,想要安装是不是把你包内文件拷贝到kghunt那个NWatch的文件夹内,覆盖掉原来的文件,在用那边的arduino启动文件来打开呢?
2、你说的EEPROM配置文件怎么安装?是不是先上传那个配置文件,再上传你的版本?不好意思我是个小白……
3、可以加你WX吗?

早上好啊,

  1. 在我的Github上下载完压缩包后,将watchX这个文件夹解压出来,然后打开watchX.ino就可以上传了(先完成第二条上传EEPROM)
  2. EEPROM这里也是解压出来.ino文件,然后上传到watchX,然后打开一下串口监视器,等到监视器停止输出数据时就说明EEPROM修改完成了,然后在像第一步那样上传watchX.ino就可以了
  3. 当然qwq,但是WX我基本不会用哎=w=,我的WX号是liecake,当然可以的话就加我的QQ吧~ 2739820933

Lawrence兄早上好,你的github上的压缩包里面没有watchX.ino文件呀~~

[Sloved Offline]


Files on Github have been fixed


Lawrence

yeah, problem sloved