Noiasca Tool Kit
Several helper functions and classes to make life with Arduino easier
Public Member Functions | List of all members
Fluorescent< T > Class Template Reference

Simulation of a fluorescent lamp or fluorescent tube. More...

#include <Noiasca_led.h>

Inherits LedBase< T >.

Public Member Functions

 Fluorescent (T &obj)
 simulate a fluroescent lamp or flurescent tube More...
 
uint16_t getCurrentBrightness ()
 get the current brightness More...
 
void on () override
 switch on
 
void off () override
 switch off
 
void toggle () override
 switch between on or off state
 
void update (uint32_t currentMillis=millis())
 check if update is necessary More...
 

Detailed Description

template<class T>
class Fluorescent< T >

Simulation of a fluorescent lamp or fluorescent tube.

Turns on and off light emitting diodes (LED) connected to a digital pin, without using the delay() function. This means that other code can run at the same time without being interrupted by the LED code.

Constructor & Destructor Documentation

◆ Fluorescent()

template<class T >
Fluorescent< T >::Fluorescent ( T &  obj)
inline

simulate a fluroescent lamp or flurescent tube

Parameters
objthe pin to connect

Member Function Documentation

◆ getCurrentBrightness()

template<class T >
uint16_t Fluorescent< T >::getCurrentBrightness ( )
inline

get the current brightness

The current brightness/level of this output

Returns
the current brigthness

◆ update()

template<class T >
void Fluorescent< T >::update ( uint32_t  currentMillis = millis())
inline

check if update is necessary

This is the "run" function. Call this function in loop() to make the effect visible.

Parameters
currentMillisyou can handover a millis timestamp