diff --git a/README.md b/README.md index 8161aa5..b87d602 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,14 @@ = Nixie Library for Arduino = -**The library depends on NixieOs library**: https://github.com/lexus2k/NixieOs. -Please download and install NixieOs also. - With this library you can easy develop software for Nixie Clock and create interesting sound and visual effects. The library contains all required modules to communicate with different peripherals hardware (RTC, sensors, tube drivers). The library was tested on Attiny85, Attiny45, Atmega168 and Atmega328p controllers. Nixie Library includes faster digitalWrite, analogRead functions implementations (nixiePinLow, nixiePinHigh, -nixieAnalogRead) for Atmega328p controllers. If you have questions, please -contact via email. +nixieAnalogRead) for Atmega328p controllers. The library uses millis() and micros() +functions. So, if you change TIMER0 settings, this will affect NixieLib behavior. +If you have questions, please contact via email. The library supports the following devices: * DS3231, DS3232 RTC chips @@ -23,6 +21,15 @@ The library supports the following devices: * RGB-LEDs (both PWM controlled and Software controlled) * LM35DZ temperature sensor +The library supports the following features: + + * Switching between states (state-machine tasks) + * Sending and processes events + ** System events: timers + ** User defined events + * Fast analog read functions (optimized for Atmega328p) + * Fast digital write functions (optimized for Atmega328p) + For more information about this library please visit https://github.com/lexus2k/nixielib. If you found any problem, please report to Issues section. diff --git a/docs/annotated.html b/docs/annotated.html index b0be07d..615939a 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -22,7 +22,7 @@
Transforms digit to binary code to control K155ID1 driver.
@@ -175,9 +173,9 @@Definition at line 62 of file nixie_k155id1.h.
@@ -211,12 +209,12 @@Definition at line 63 of file nixie_k155id1.cpp.
+Definition at line 57 of file nixie_k155id1.cpp.
void K155ID1::setExtendedPins | +void K155ID1::switchPin | ( | uint8_t | -value | ) | -+ | pin, |
Sets extended pins corresponding to specified bitvalues
[in] | value | - bit values for each extended pin |
Implements NixieDriver.
- -Definition at line 50 of file nixie_k155id1.cpp.
- -Base class for all drivers to control Nixie tubes cathodes.
@@ -121,8 +119,8 @@virtual void NixieDriver::setExtendedPins | +virtual void NixieDriver::switchPin | ( | uint8_t | -value | ) | -+ | pin, |
Changes extended control pins. Actual implementation depends on specific driver.
- -Implemented in K155ID1.
- -
-
|
@@ -173,15 +152,16 @@
[in] | pin | - pin to enable |
[in] | extendedPins | - pin to enable |
Implemented in K155ID1.
+Implemented in K155ID1.
diff --git a/docs/class_nixie_events-members.html b/docs/class_nixie_events-members.html new file mode 100644 index 0000000..bdbb77c --- /dev/null +++ b/docs/class_nixie_events-members.html @@ -0,0 +1,83 @@ + + + + + + + +
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
This is the complete list of members for NixieEvents, including all inherited members.
+get() | NixieEvents | |
hasEvent() | NixieEvents | |
NixieEvents() | NixieEvents | |
put(uint8_t event, uint8_t param) | NixieEvents | |
put(SNixieEvent &event) | NixieEvents |
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
#include <nixieos_events.h>
+Public Member Functions | |
NixieEvents () | |
bool | put (uint8_t event, uint8_t param) |
bool | put (SNixieEvent &event) |
SNixieEvent | get () |
bool | hasEvent () |
Class encapsulates work with events.
+ +Definition at line 48 of file nixieos_events.h.
+NixieEvents::NixieEvents | +( | +) | ++ |
Builds new events fifo container
+ +SNixieEvent NixieEvents::get | +( | +) | ++ |
bool NixieEvents::hasEvent | +( | +) | ++ |
Returns true if there are events in events container
+ +bool NixieEvents::put | +( | +uint8_t | +event, | +
+ | + | uint8_t | +param | +
+ | ) | ++ |
Puts event to events container
event | - application specific event |
param | - parameter related to event |
bool NixieEvents::put | +( | +SNixieEvent & | +event | ) | ++ |
Puts event to events container
event | - application specific event |
Starts blinking effect. The effect needs to be stopped by noBlink() function.
-Definition at line 292 of file nixie_tube.cpp.
+Definition at line 291 of file nixie_tube.cpp.
@@ -604,7 +604,7 @@Stops blinking effect.
-Definition at line 305 of file nixie_tube.cpp.
+Definition at line 304 of file nixie_tube.cpp.
@@ -828,7 +828,7 @@Definition at line 378 of file nixie_tube.cpp.
@@ -907,7 +907,7 @@Initiates wrapping digits effect and finally switching to specified state. Wrapping effect lasts for about 0.5 seconds. The difference from scrollForward() is that digits are being changed in reverse order: 5, 4, 3, 2, 1, 0, 9, etc.
-Definition at line 347 of file nixie_tube.cpp.
+Definition at line 346 of file nixie_tube.cpp.
@@ -928,7 +928,7 @@Initiates wrapping digits effect and finally switching to specified state. Wrapping effect lasts for about 0.5 seconds.
-Definition at line 337 of file nixie_tube.cpp.
+Definition at line 336 of file nixie_tube.cpp.
@@ -949,7 +949,7 @@Starts wrapping digits effect finally switching tube to TUBE_OFF state
-Definition at line 358 of file nixie_tube.cpp.
+Definition at line 357 of file nixie_tube.cpp.
@@ -975,7 +975,7 @@Definition at line 362 of file nixie_tube.cpp.
@@ -996,7 +996,7 @@Starts wrapping digits effect smoothly switching tube on.
-Definition at line 316 of file nixie_tube.cpp.
+Definition at line 315 of file nixie_tube.cpp.
@@ -1022,7 +1022,7 @@Definition at line 321 of file nixie_tube.cpp.
@@ -1221,7 +1221,7 @@Turns off the tube by smoothly decreasing tube brightness to the zero and switching to TUBE_OFF state
-Definition at line 280 of file nixie_tube.cpp.
+Definition at line 279 of file nixie_tube.cpp.
@@ -1241,7 +1241,7 @@Turns on the tube by smoothly increasing tube brightness to the set brightness value
-Definition at line 270 of file nixie_tube.cpp.
+Definition at line 269 of file nixie_tube.cpp.
diff --git a/docs/class_simple_client_i2c-members.html b/docs/class_simple_client_i2c-members.html index a946b25..fa22629 100644 --- a/docs/class_simple_client_i2c-members.html +++ b/docs/class_simple_client_i2c-members.html @@ -22,7 +22,7 @@
|
| NixieDriver | NixiePwmRgbLed | SNixieColor | ||
NixieHTU21 | NixieSoftRgbLed | SNixieSamplingNote | ||||
Ds3231 | NixieAnalogButtons | NixieLdrGl5528 | NixieTube | SNixieTempoNote | NixieEvents | NixiePwmRgbLed | SNixieColor | +
NixieHTU21 | NixieSoftRgbLed | SNixieEvent | ||||
Ds3231 | NixieAnalogButtons | NixieLdrGl5528 | NixieTube | SNixieSamplingNote | ||
| NixieAudioChannel | NixieLed |
| |||
NixieDisplay | NixieMelody | |||||
K155ID1 | SimpleClientI2c | SNixieStateInfo | +||||
NixieDisplay | NixieMelody | SNixieTempoNote | ||||
K155ID1 | NixieDriver | NixieOsTime | SimpleClientI2c | |||
This is Nixie Library implementation for Arduino.
With this library you can easy develop software for Nixie Clock and create interesting sound and visual effects. The library contains all required modules to communicate with different peripherals hardware (RTC, sensors, tube drivers). The library was tested on Attiny85, Attiny45, Atmega168 and Atmega328p controllers. Nixie Library includes faster digitalWrite, analogRead functions implementations (nixiePinLow, nixiePinHigh, nixieAnalogRead) for Atmega328p controllers. If you have questions, please contact via email.
-The library supports the following devices: DS3231, DS3232 RTC chips Piezo buzzer audio output Analog buttons I2C client implementation for slave devices Nixie Tubes (any: IN-14, IN-12, etc. ) GL 5528 lightsensor (most popular light sensor on Arduino platforms) K155ID1 nixie drivers Mono-LEDs RGB-LEDs (PWM controlled) LM35DZ, HTU21 temperature sensor DS3232 temperature values.
+With this library you can easy develop software for Nixie Clock and create interesting sound and visual effects. The library contains all required modules to communicate with different peripherals hardware (RTC, sensors, tube drivers). The library was tested on Attiny85, Attiny45, Atmega168 and Atmega328p controllers. The library uses millis() and micros() functions. So, if you change TIMER0 settings, this will affect Nixie Library behavior. Nixie Library includes faster digitalWrite, analogRead functions implementations (nixiePinLow, nixiePinHigh, nixieAnalogRead) for Atmega328p controllers. If you have questions, please contact via email.
+The library supports the following devices: DS3231, DS3232 RTC chips Piezo buzzer audio output Analog buttons I2C client implementation for slave devices Nixie Tubes (any: IN-14, IN-12, etc. ) GL 5528 lightsensor (most popular light sensor on Arduino platforms) K155ID1 nixie drivers Mono-LEDs RGB-LEDs (PWM controlled) LM35DZ, HTU21 temperature sensor DS3232 temperature values.
+The library supports the following features: Switching between states (state-machine tasks) Sending and processes events System events: timers User defined events Fast analog read functions (optimized for Atmega328p) Fast digital write functions (optimized for Atmega328p)
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+Enumerations | |
enum | { TIMER_0, +TIMER_1 + } |
+Functions | |
void | setup (const SNixieStateInfo tasks[]) |
Initializes state machine states information. More... | |
void | loop () |
Starts infinite loop. More... | |
void | run () |
Runs single iteration of state machine. More... | |
void | refresh () |
refreshes internal variables of NixieOs. More... | |
void | pushTask (uint8_t id) |
remembers current state and switches to new state. More... | |
void | popTask () |
switches back to remembered state. More... | |
void | switchTask (uint8_t id) |
switches to new state. More... | |
bool | sendEvent (uint8_t id, uint8_t param) |
puts new event to internal NixieOs queue. More... | |
void | resetTimer (uint8_t id) |
resets timer, and it starts to count again More... | |
void | stopTimer (uint8_t id) |
stops and disables timer. More... | |
void | startTimer (uint8_t id, uint32_t timeoutMs) |
enables and starts timer. More... | |
void | restartTimer (uint8_t id) |
restarts disabled timer. More... | |
NixieOs service functions
+void NixieOs::loop | +( | +) | ++ |
Starts infinite loop.
+Enters infinite loop and runs state machine. If you want to do anything else outside state machine functions, please, do not use this function. Refer to run() function instead.
+ +void NixieOs::popTask | +( | +) | ++ |
switches back to remembered state.
+Switches to remembered state. This function calls SSSEnterFunction(), where SSS is state name.
+void NixieOs::pushTask | +( | +uint8_t | +id | ) | ++ |
void NixieOs::refresh | +( | +) | ++ |
void NixieOs::resetTimer | +( | +uint8_t | +id | ) | ++ |
resets timer, and it starts to count again
+resets timer counter and it starts from zero.
+id | - unique id of timer. |
void NixieOs::restartTimer | +( | +uint8_t | +id | ) | ++ |
restarts disabled timer.
+restarts disabled timer. When timeoutMs time passes, timer generates NIXIEOS_EVENT_TIMEOUT event.
+id | - unique id of timer. |
void NixieOs::run | +( | +) | ++ |
Runs single iteration of state machine.
+Runs single iteration of state machine and exists.
+ +bool NixieOs::sendEvent | +( | +uint8_t | +id, | +
+ | + | uint8_t | +param | +
+ | ) | ++ |
puts new event to internal NixieOs queue.
+Puts new event to internal NixieOs queue. The events from internal queue are peeked by run() method and are passed to SSSEventFunction() if the currently active state.
+id | - event unique id |
param | - additional parameter for the event. |
void NixieOs::setup | +( | +const SNixieStateInfo | +tasks[] | ) | ++ |
Initializes state machine states information.
+Intializes state machine states info and internal NixieOs variables.
+tasks | - pointer to state machine states array. |
void NixieOs::startTimer | +( | +uint8_t | +id, | +
+ | + | uint32_t | +timeoutMs | +
+ | ) | ++ |
enables and starts timer.
+enables and starts timer. When timeoutMs time passes, timer generates NIXIEOS_EVENT_TIMEOUT event.
+id | - unique id of timer. |
timeoutMs | - timeout in milliseconds |
void NixieOs::stopTimer | +( | +uint8_t | +id | ) | ++ |
stops and disables timer.
+stops and disables timer.
+id | - unique id of timer. |
void NixieOs::switchTask | +( | +uint8_t | +id | ) | ++ |
switches to new state.
+Switches to new state. This function calls SSSEnterFunction(), where SSS is state name.
+id | - state unique number. |
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
NNixieOs |
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
Nixie Library Types. +More...
+#include <arduino.h>
#include <avr/pgmspace.h>
Go to the source code of this file.
+Nixie Library Types.
+This file contains cross-platform definition of the types, used by Nixie Os Library.
+ +Definition in file nixieos_types.h.
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
This is the complete list of members for NixieOsTime, including all inherited members.
+hours | NixieOsTime | |
minutes | NixieOsTime | |
seconds | NixieOsTime |
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
#include <nixieos_time.h>
+Public Attributes | |
+uint8_t | hours |
hours | |
+uint8_t | minutes |
minutes | |
+uint8_t | seconds |
seconds | |
Describes time
+ +Definition at line 38 of file nixieos_time.h.
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
This is the complete list of members for SNixieEvent, including all inherited members.
+event | SNixieEvent | |
param | SNixieEvent |
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
SNixieEvent describes content of single event. + More...
+ +#include <nixieos_events.h>
+Public Attributes | |
+uint8_t | event |
number of event, occured. | |
+uint8_t | param |
additional parameter. For example, for timer event this is timer #. | |
SNixieEvent describes content of single event.
+ +Definition at line 37 of file nixieos_events.h.
+
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
This is the complete list of members for SNixieStateInfo, including all inherited members.
+enterCb | SNixieStateInfo | |
eventCb | SNixieStateInfo | |
id | SNixieStateInfo | |
stateCb | SNixieStateInfo |
+ Nixie Library
+ 0.6.0
+
+ Nixie Library to develop Nixie Clock
+ |
+
#include <nixieos_tasks.h>
+Public Attributes | |
+uint8_t | id |
unique id of the state | |
+void(* | enterCb )() |
state entry function | |
+void(* | stateCb )() |
state main function | |
+void(* | eventCb )(SNixieEvent &event) |
state event processing function | |
Describes single state of NixieOs
+ +Definition at line 43 of file nixieos_tasks.h.
+