About 8 years ago I created wall clock with bluetooth synced time. Ok, its enough. Lets go to modern world with universal wifi driven devices! Today I trashed old AVR microcontroller from wall clock and used esp8266. 8 MHz and 80MHz… feel difference! At first steps I used ESP-12 NodeMCU module to develop and debug firmware. You can do final device with this module if you absolutely novice in mcu programming, if not you can do it with ESP-01 module.
Do not forget turn on SPIFFS 1M option in Arduino IDE. At first run device will turn on own AP with configuring interface, connect it to your wifi network. With ESP-01 modules vendored by Puya problem, SPIFFS is not accessible! Saving parameters works only with ESP-12. This problem must be solved in future SDK versions.
Download source code
Wiring for NodeMCU ESP-12 development board
Wiring for ESP-01 board
Final device after moving to ESP-01
Checkout my another clock projects:
Yes, you can sign your commits! GIT supports it out of the box.
Sample signed commit git.blindage.org/commit/e1a24a6814082efb74cbad924c68a40b505f4e74
At first, create your secret and public keys, I wrote earlier about it (for english speaking users).
Check your keys
Add your fingerprint to your git configuration
$ git config --global user.signingkey A37721C3
Now you can sign your commits!
$ git commit -a -S -m 'fixed bugs, added new'
Here you can read full git documentation about this great feature.
№ 9343 В разделе "Программирование" от September 3rd, 2018,
import csv def linreg(X, Y): """ return a,b in solution to y = ax + b such that root mean square distance between trend line and original points is minimized """ N = len(X) Sx = Sy = Sxx = Syy = Sxy = 0.0 for x, y in zip(X, Y): Sx = Sx + x Sy = Sy + y Sxx = Sxx + x*x Syy = Syy + y*y Sxy = Sxy + x*y det = Sxx * N - Sx * Sx return (Sxy * N - Sy * Sx)/det, (Sxx * Sy - Sx * Sxy)/det x = [12, 34, 29, 38, 34, 51, 29, 34, 47, 34, 55, 94, 68, 81] a,b = linreg(range(len(x)),x) #your x,y are switched from standard notation extrapolatedtrendline=[a*index + b for index in range(len(x))] with open('open_in_calc.csv','w') as csvfile: spamwriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) spamwriter.writerow(x) spamwriter.writerow(extrapolatedtrendline)
Fortune cookie: I figure that if God actually does exist, He's big enough to understand an honest difference of opinion. -- Isaac Asimov