Arduino programmable smart Watch

Anything not related to STM32
User avatar
RogerClark
Posts: 5961
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino programmable smart Watch

Post by RogerClark » Mon Oct 31, 2016 7:01 am

Actually

These may be the correct defines

Code: Select all

#define VIBRATE 8
#define TOUCH 7
#define BUTTON 4

racemaniac
Posts: 402
Joined: Sat Nov 07, 2015 9:09 am

Re: Arduino programmable smart Watch

Post by racemaniac » Mon Oct 31, 2016 7:06 am

RogerClark wrote:Actually

These may be the correct defines

Code: Select all

#define VIBRATE 8
#define TOUCH 7
#define BUTTON 4
I'll first have to hook up a battery again. without the battery the motor won't move anyway. it's directly supplied from there, not from the gnd/vdd pins i'm using now to power the watch.

User avatar
RogerClark
Posts: 5961
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino programmable smart Watch

Post by RogerClark » Mon Oct 31, 2016 8:28 pm

BTW.

The digital watch code has 2 problems.

1. Takes too much power
The display seems to take power even if it is turned off via the SPI command.
The only way that I found to stop it taking power seems to be by using its Reset input. But then you have re-initialise the display each time before you use it.

Perhaps turning off the Charge Pump in the display would reduce current, but I have not had time to try various commands to see which of them would fix this.

2. The watch seemed to show the correct time for about 10 hours, but I then had a glitch and I think it lost or perhaps gained about 30 minutes.

At the moment I dont now what caused this.

racemaniac
Posts: 402
Joined: Sat Nov 07, 2015 9:09 am

Re: Arduino programmable smart Watch

Post by racemaniac » Mon Oct 31, 2016 8:34 pm

RogerClark wrote:BTW.

The digital watch code has 2 problems.

1. Takes too much power
The display seems to take power even if it is turned off via the SPI command.
The only way that I found to stop it taking power seems to be by using its Reset input. But then you have re-initialise the display each time before you use it.

Perhaps turning off the Charge Pump in the display would reduce current, but I have not had time to try various commands to see which of them would fix this.

2. The watch seemed to show the correct time for about 10 hours, but I then had a glitch and I think it lost or perhaps gained about 30 minutes.

At the moment I dont now what caused this.
i'm now looking into the code of the oled, to get to know it a bit, it'll take me a while to get up to speed with what the current code is doing :).
i also noticed in your current code you disabled the updating of the time :), probably because it wasn't correct?

User avatar
RogerClark
Posts: 5961
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino programmable smart Watch

Post by RogerClark » Mon Oct 31, 2016 8:53 pm

Getting the OLED to work in the first place took some time ;-)

There are a load of setup commands, for the display size ( rows , cols etc) and stuff to do with the Charge Pump etc.

I tried to set the watch using the time and date compiler variables, but its not quite right as it depends on how long it takes to compile and upload.

But its better than nothing ;-)

I cant remember the Start and Stop code for the time, so perhaps thats a mistake.


BTW.
Currently we are using my old repo for this, which is based on RBLs repo.

But we should really move to my new one, sooner or later, as its based on Sandeep Mistry's repo which is better.

However the OLED code only runs on the old repo, as the OLED code came from mbed, and RBLs code has mbed functions in it.

I don't think it would be hard to port the OLED library to the new repo, but I don't have time to do this at the moment. ;-(

racemaniac
Posts: 402
Joined: Sat Nov 07, 2015 9:09 am

Re: Arduino programmable smart Watch

Post by racemaniac » Mon Oct 31, 2016 8:58 pm

RogerClark wrote:However the OLED code only runs on the old repo, as the OLED code came from mbed, and RBLs code has mbed functions in it.

I don't think it would be hard to port the OLED library to the new repo, but I don't have time to do this at the moment. ;-(
When reading the code, i think i came across some of the mbed functions, they confused the hell out of me :p.
but it indeed shouldn't be too hard to port it.

Which repo is now which? i'm still getting confused with the 2 repos :p.

User avatar
RogerClark
Posts: 5961
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino programmable smart Watch

Post by RogerClark » Mon Oct 31, 2016 9:31 pm

The mbed code confused me as well to start with, as the lib was created by Goran (who is on Gitter not this forum), and I didnt realise it used some mbed ways of doing things

Re: Repos

Sorry. There are 3 of them and I forgot the really old one.

Do not use this one.
Its "very old" and I should probably remove it
https://github.com/rogerclarkmelbourne/nRF51822-Arduino


This is the "old" one which works with the Smart watch. Its based on RedBearLab's repo (which is based on mbed)
https://github.com/rogerclarkmelbourne/Arduino_nrf51822

This one
https://github.com/rogerclarkmelbourne/arduino-nRF5

Is the latest one, but does not work with the Smart watch, and also has some other problems. However in the long term this will be the best repo, as its a fork of Sandeep Mistry's new repo, which has been written from scratch and doesnt have all the mbed etc junk in it.

However at the moment our OLED code does not run with it (because of the mbed stuff), and also Sandeep's repo does not include BLE examples (they are in a separate repo on his github account) and the BLE examples e.g. the Beacon seem to have problems and take too much power (according to what Goran has told me)


So..

Continue to use the repo which works for you, as its good enough to understand how the watch works, and also you can play with the BLE examples as they also work on the watch e.g. make it a iBeacon if you want, or perhaps merge the UART demo and send messages to the display ;-)

User avatar
RogerClark
Posts: 5961
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino programmable smart Watch

Post by RogerClark » Mon Oct 31, 2016 9:34 pm

BTW.

I just bought (and received) a USB BLE dongle (from eBay). (they only cost $5)

I'm hoping (eventually) to be able to upload via DFU from Windows.

But I only received the dongle yesterday, and I'm really busy with work, so I have not had time to understand how to communicate with it.
(Also I think only Windows 8 and newer e.g 8.1 and W10 have the BLE stack, and I normally run W7 as its stable)

I suspect Linux also supports these dongles (which seem to be made by CSR), but I have not had time to try that either :-(

racemaniac
Posts: 402
Joined: Sat Nov 07, 2015 9:09 am

Re: Arduino programmable smart Watch

Post by racemaniac » Tue Nov 01, 2016 6:24 am

RogerClark wrote:BTW.

I just bought (and received) a USB BLE dongle (from eBay). (they only cost $5)

I'm hoping (eventually) to be able to upload via DFU from Windows.

But I only received the dongle yesterday, and I'm really busy with work, so I have not had time to understand how to communicate with it.
(Also I think only Windows 8 and newer e.g 8.1 and W10 have the BLE stack, and I normally run W7 as its stable)

I suspect Linux also supports these dongles (which seem to be made by CSR), but I have not had time to try that either :-(
i'm also going to order one, and i just upgraded to windows 10, so i hope it's supported XD
i've also been experimenting with xamarin a bit to see if i can make my own android app to communicate with these little buggers :D.
but soo much to do and so little time XD

User avatar
RogerClark
Posts: 5961
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino programmable smart Watch

Post by RogerClark » Tue Nov 01, 2016 7:19 am

I think Cordova (Phone gap) also has some BLE features (so does App Inventor ;-)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest