开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Using NTP clock board for Bruce's GPS clock - HELP needed. #code


 

?
Bruce's GPS clock is my favorite hobby electronic clock. As I type I can see 7 gps or ntp clocks, and I have others. I like clocks!
?
I had a couple extra of Bruce's NTP clock boards and a few ESP8266 D1 Mini boards and a couple of surplus gps modules. I decided to see if I could get the STM GPS clock software running on the NTP clock ESP board.
?
I am NOT a programmer. I discovered this lack of talent decades ago.
?
I had little trouble getting the GPS clock software to work by working through Bruce's Tutorials using the ESP8266 instead of a Blue Pill. I finally figured out Software Serial and that interrupt code has to be in ram. So I have been mostly successful.?
?
My unsolved problems are relatively small. I am getting weird satellite numbers. The clock is randomly regressing an hour occasionally, and giving an erroneous date (this may be from moving it around). I can only start in screen 0. Trying to start in screen 1 or 2 results in a very brief flash of the selected screen then back to screen 0 and the clock starts.
?
My biggest problem is getting Touch to work to switch screens. I made the edits in Bodmer TFT_eSPI v2.4.32 User_Setup.h. I used Pin_D0 for TOUCH_CS. I ran a jumper from the T_CS pin of the tft to pin D0 on the ESP8266 module.
?
Bodmer library Test and Diagnostic examples are below. I am open to suggestions on how to get touch working. A picture of the clock display is also below.
?
Mitch W4OA
Opelika AL
___________________



Bodmer library examples:
?
Colour_Test - works perfectly.
?
Read_User_Setup gives this output:
[code]
TFT_eSPI ver = 2.4.32
Processor? ? = ESP8266
Frequency? ? = 80MHz
Voltage? ? ? = 3.33V
Transactions = No
Interface? ? = SPI
SPI overlap? = No
?
Display driver = 9341
Display width? = 240
Display height = 320
?
TFT_CS? ?= PIN_D8
TFT_DC? ?= PIN_D3
TOUCH_CS = PIN_D0
?
Font GLCD? ?loaded
Font 2? ? ? loaded
Font 4? ? ? loaded
Font 6? ? ? loaded
Font 7? ? ? loaded
Font 8? ? ? loaded
?
?
Test_Touch_Controller gives this output:
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
...
?
?
TFT_ReadWrite_Test gives this result:
?
Pixel value written = 1
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
Pixel value written = 2
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 4
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 8
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 10
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 20
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 40
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 80
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 100
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 200
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 400
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 800
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 1000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 2000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 4000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 8000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 1
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 2
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 4
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 8
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 10
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 20
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 40
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 80
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 100
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?
?
?
?
?
?


 

开云体育

I'm sorry Mitch, I have NO idea. I'm STILL learning. Maybe we should take an old-folks class!? LOL!! I really wish I could help. Nice project though. Can you send me the parts list and what is needed to build this? Thanks, Lou.


From: w8bhMorseTutor@groups.io <w8bhMorseTutor@groups.io> on behalf of Mitch W4OA <w4oa@...>
Sent: Friday, June 9, 2023 2:34 PM
To: w8bhMorseTutor@groups.io <w8bhMorseTutor@groups.io>
Subject: [w8bhMorseTutor] Using NTP clock board for Bruce's GPS clock - HELP needed. #code
?
?
Bruce's GPS clock is my favorite hobby electronic clock. As I type I can see 7 gps or ntp clocks, and I have others. I like clocks!
?
I had a couple extra of Bruce's NTP clock boards and a few ESP8266 D1 Mini boards and a couple of surplus gps modules. I decided to see if I could get the STM GPS clock software running on the NTP clock ESP board.
?
I am NOT a programmer. I discovered this lack of talent decades ago.
?
I had little trouble getting the GPS clock software to work by working through Bruce's Tutorials using the ESP8266 instead of a Blue Pill. I finally figured out Software Serial and that interrupt code has to be in ram. So I have been mostly successful.?
?
My unsolved problems are relatively small. I am getting weird satellite numbers. The clock is randomly regressing an hour occasionally, and giving an erroneous date (this may be from moving it around). I can only start in screen 0. Trying to start in screen 1 or 2 results in a very brief flash of the selected screen then back to screen 0 and the clock starts.
?
My biggest problem is getting Touch to work to switch screens. I made the edits in Bodmer TFT_eSPI v2.4.32 User_Setup.h. I used Pin_D0 for TOUCH_CS. I ran a jumper from the T_CS pin of the tft to pin D0 on the ESP8266 module.
?
Bodmer library Test and Diagnostic examples are below. I am open to suggestions on how to get touch working. A picture of the clock display is also below.
?
Mitch W4OA
Opelika AL
___________________



Bodmer library examples:
?
Colour_Test - works perfectly.
?
Read_User_Setup gives this output:
[code]
TFT_eSPI ver = 2.4.32
Processor? ? = ESP8266
Frequency? ? = 80MHz
Voltage? ? ? = 3.33V
Transactions = No
Interface? ? = SPI
SPI overlap? = No
?
Display driver = 9341
Display width? = 240
Display height = 320
?
TFT_CS? ?= PIN_D8
TFT_DC? ?= PIN_D3
TOUCH_CS = PIN_D0
?
Font GLCD? ?loaded
Font 2? ? ? loaded
Font 4? ? ? loaded
Font 6? ? ? loaded
Font 7? ? ? loaded
Font 8? ? ? loaded
?
?
Test_Touch_Controller gives this output:
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
x: 8191? ? ?y: 8191? ? ?z: 4095?
...
?
?
TFT_ReadWrite_Test gives this result:
?
Pixel value written = 1
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
Pixel value written = 2
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 4
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 8
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 10
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 20
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 40
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 80
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 100
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 200
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 400
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 800
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 1000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 2000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 4000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 8000
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 1
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 2
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 4
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 8
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 10
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 20
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 40
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 80
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?Pixel value written = 100
?Pixel value read? ? = FFFF
?ERROR? ? ? ? ? ? ? ? ?^^^^
?
?
?
?
?
?


 

Mitch
I have made a expantion on Bruce NTP clock
I've modified the sketch to a NTP Worldclock
I can now see UTP time and 8 continents or special citys who are displayed for some time and than scroll to the next one. You can modify the continents or citys you like to see.
If you have interrest, please let me know and i send you the new sketch.? No hardware change needed !? Just a new sketch


 

Hi Lou,

Well, the parts list is very short. A Lolin (Wemos) D1 R2 module just like in the NTP clock, a gps module with PPS output, one resistor, one capacitor. Of course you also need a printed circuit board, which are only ~$6-7 for 5 from CN if you select the economy shipping rate. The gerbers are on Bruce's github for the NTP clock.

Bruce also has designed a case that you can print with a 3d printer. If you decide to build one, and need a case printed, let me know. I have a small 3d printer "garden".?

Mitch W4OA
Opelika, AL


 

Hi Cor,

Yes I would very much like your sketch. it is very easy to convert to the ESP8266 chip. Of course, you lose the battery and speaker, which I don't need. I try to run all of my projects on 5v, that really simplifies things. Please send me a private message with the sketch attached. I will see if I can convert it for the ESP8266.

LA3ZA?https://github.com/la3za/GPS-clock has?Europeanized?Bruce's sketch to add?formats for date and units. I converted his sketch, a picture is below.?

Unfortunately, I have not had time to work on touch. I will get back on that shortly.

Mitch W4OA
Opelika, AL
ps I just noticed the number of satellites is 0. I had just turned the clock on when I took the picture. It takes a few minutes for the number of satellites to show up.


 

To Mitch and all others interested?

To All interested?to change Bruce's NTP Dual Clock to a NTP Worldclock
just another sketch.. no more...
You can choose your own favorite Continents, Countrys?or City's?from the Posix Timezone list
Just a note :? There are Continents or Countrys?who have no changes in Summer- or Wintertime
Place the as last in the sketch
?
No hardware changes ! Just change the sketch
Define your own Title, SSID and Password , lines 39 to 41 and see my favorites?
You can use more entrys, but take care of the time to display them
?
?
With Regards

Cor Struyk, PA0GTB


 

Really nice Cor!!

I loaded the sketch on my test clock and I really like it! I added Chicago as that is my local CDT time.

See pictures below.

Mitch W4OA
Opelika, AL


 


I solved my problem with touch, got it going. :) Works great.

But, now my gps has quit working. :(? It won't lock when connected to the clock board. Once I get that wrinkle ironed out, I will post the sketch, the TFT_eSPI setup, and the wiring to make touch work if anyone is interested.

Mitch W4OA
Opelika, AL


 

Ok, success
Its a nice extention


 

Super !


 


OK, got the GPS Clock fully functional on Bruce's NTP Clock pcb. See the attached writeup, which includes the Bodmer library setup file, the sketch with touch fully working, and a description and pictures of the jumpers to add to the pcb to get touch fully working.

I moded Bruce's case to add small feet and a USB C connector for power. (I try to run all of my 'projects' with 5v usb power to keep things simple.)

Mitch W4OA
Opelika, AL


 

Very nice small design


 

Heel mooi klein ontwerp


 

If anyone is interested, I modded the code for the GPS clock to add some sound effects...ticks and tocks and Westminster chimes on the hour and quarter hour. I used a small I2C MP3 board with an SD card to hold the sounds in MP3 format. The code works but I haven't refined it as much as I originally planned. It's mostly parameterized so you can choose what effects to use, the volume, quiet times, etc. It's kinda cool if I do say so myself. If anyone is interested I can send or post the code and some more details but it won't be nearly as refined or documented as Bruce usually does.

73...???? Mark???? AA7TA