jgc / falco_sw_photon Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
[https://docs.particle.io/reference/firmware/photon/#software-timers]
Mounting hole/s not required as mounted onto TFT
Ie create generic function to handle wire.transmission to simplify Loop code.
Add 'Particle.variable' for number of 'unpublished reports', e.g. when wifi is disconnected.
This will allow node IDs to be re-used without deleting all and starting again. Useful if the wrong node is allocated the wrong node ID.
Linked to: jgc/falco_sw_ard_tft#8
Values (int, char) where value mod 4 = 1 received as x -1 on photon.
Seems to appear if if semi_automatic mode used. Not tested with semi_automatic and system_thread(enabled).
Appears to be a Windows 10 issue (strange though that appeared with 0.4.9)
Node 2 appears to jump to node 5 (note node 4 is fixed), node 5 jumps to node 6 correctly
Change Payload variables to an array to allow code to be reduced.
Add 'ifdef' DEBUG_ON, DEBUG_MIN etc to code to reduce size. Note DEBUG does not work as a reserved word.
Code:
E.G. button clicks
[https://docs.particle.io/reference/firmware/photon/#system-events]
Add:
Assume for initial version that RTC not used as no battery backup. Millis() returns the number of milliseconds since the device began running the current program. This number will overflow (go back to zero), after approximately 49 days.unsigned long time = millis(); Note: The return value for millis is an unsigned long, errors may be generated if a programmer tries to do math with other datatypes such as ints.
Example (assumes reset within every 49 days):
unsigned long lastSync = millis();
void loop() {
if (millis() - lastSync > ONE_DAY_MILLIS) {
// Request time synchronization from the Particle Cloud
Particle.syncTime();
lastSync = millis();
}
}
Add validation to improve display message reliability and reduce change of character corruption. See if wire.transmission can provide a checksum. Consider adding ACK and resend capabilities.
Add number of bytes (length) to Wire.write(data, length) - see https://www.arduino.cc/en/Reference/WireWrite
See https://www.arduino.cc/en/Reference/WireEndTransmission
0:success
1:data too long to fit in transmit buffer
2:received NACK on transmit of address
3:received NACK on transmit of data
4:other error
Add:
Assume for initial version that RTC not used as no battery backup. Millis() returns the number of milliseconds since the device began running the current program. This number will overflow (go back to zero), after approximately 49 days.unsigned long time = millis(); Note: The return value for millis is an unsigned long, errors may be generated if a programmer tries to do math with other datatypes such as ints. NB: Need to set time zone for Time.timeStr(). [https://docs.particle.io/reference/firmware/photon/#timestr-]
Will allow one button to perform multiple tasks
See:
https://community.particle.io/t/clickbutton-library/2658/13
https://build.particle.io/libs/56b49dec923ae9b431003593/tab/clickButtonDemo.cpp
ie particle.publish reports.
Appears to have been resolved?
Also need to add support to falco_sw_ard_tft
See [https://github.com/jgc/falco_sw_ard_tft/issues/1]
Consider use of button_status to measure duration of press [https://docs.particle.io/reference/firmware/photon/#system-events]
button_status:
128 button pressed or released
the duration in ms the button was pressed: 0 when pressed, >0 on release.
See example of button_status code [https://github.com/particle-iot/device-os/pull/611]
Also see:
button_final_click:
8192 sent after a run of one or more clicks not followed by additional clicks. Unlike the button_click event, the button_final_click event is sent once, at the end of a series of clicks. int clicks = system_button_clicks(param); retrieves the number of times the button was pushed.
Also requires hardware change
Add SYSTEM_MODE(SEMI_AUTOMATIC) to allow code to run if no wifi is present at restart.
[https://docs.particle.io/support/troubleshooting/mode-switching/photon/#semi-automatic-mode]
Also add:
Replace with new device info etc
Improve sequencing of data transmissions, ACKs and checks for connectivity
When the base station has no nodes reset the radio encryption key to a random value.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.