E707 Basic NodeMCU-V2 Shield Library  1.0
Data Structures | Macros | Functions
basic-nodemcuv2-shield.h File Reference
#include <Arduino.h>

Go to the source code of this file.

Data Structures

class  _TempSensor
 Base class for any temperature sensor. More...
 
class  LM35
 The LM35 temp-sensor class. More...
 
class  LM36
 The LM36 temp-sensor class. More...
 

Macros

#define SHIELD_SEGA   15
 The pin connected to Segment A of the 7-Seg display. More...
 
#define SHIELD_SEGB   13
 The pin connected to Segment B of the 7-Seg display. More...
 
#define SHIELD_SEGC   12
 The pin connected to Segment C of the 7-Seg display. More...
 
#define SHIELD_SEGD   4
 The pin connected to Segment D of the 7-Seg display. More...
 
#define SHIELD_SEGE   0
 The pin connected to Segment E of the 7-Seg display. More...
 
#define SHIELD_SEGG   2
 The pin connected to Segment F of the 7-Seg display. More...
 
#define SHIELD_SEGF   14
 The pin connected to Segment G of the 7-Seg display. More...
 
#define SHIELD_LEDR   SHIELD_SEGA
 The pin connected to the Red LED. More...
 
#define SHIELD_LEDG   SHIELD_SEGD
 The pin connected to the Green LED. More...
 
#define SHIELD_LEDB   SHIELD_SEGG
 The pin connected to the Blue LED. More...
 
#define SHIELD_BT1   16
 The pin connected to Button 1. More...
 
#define SHIELD_BT2   5
 The pin connected to Button 2. More...
 
#define SHIELD_BT3   10
 The pin connected to Button 3. More...
 

Functions

void shieldSetPinout (void)
 Set the pin mode (INPUT or OUTPUT) for all relavent pins for the shield's periferals. More...
 
void shieldDisplayDigit (int digit)
 Set a digit (between 0 and 9) on the 7 segment display of the shield. More...
 

Function Documentation

◆ shieldDisplayDigit()

void shieldDisplayDigit ( int  digit)

Set a digit (between 0 and 9) on the 7 segment display of the shield.

Parameters
digitThe digit to display, between 0 and 9.

Example:

void setup(){
}
void loop(){
// Display a 6 on the 7-segment display
delay(500);
// Display a 9 on the 7-segment display
}
void shieldSetPinout(void)
Set the pin mode (INPUT or OUTPUT) for all relavent pins for the shield's periferals.
Definition: basic-nodemcuv2-shield.cpp:30
void shieldDisplayDigit(int digit)
Set a digit (between 0 and 9) on the 7 segment display of the shield.
Definition: basic-nodemcuv2-shield.cpp:46

◆ shieldSetPinout()

void shieldSetPinout ( void  )

Set the pin mode (INPUT or OUTPUT) for all relavent pins for the shield's periferals.

Macro Definition Documentation

◆ SHIELD_BT1

#define SHIELD_BT1   16

The pin connected to Button 1.

◆ SHIELD_BT2

#define SHIELD_BT2   5

The pin connected to Button 2.

◆ SHIELD_BT3

#define SHIELD_BT3   10

The pin connected to Button 3.

◆ SHIELD_LEDB

#define SHIELD_LEDB   SHIELD_SEGG

The pin connected to the Blue LED.

◆ SHIELD_LEDG

#define SHIELD_LEDG   SHIELD_SEGD

The pin connected to the Green LED.

◆ SHIELD_LEDR

#define SHIELD_LEDR   SHIELD_SEGA

The pin connected to the Red LED.

◆ SHIELD_SEGA

#define SHIELD_SEGA   15

The pin connected to Segment A of the 7-Seg display.

◆ SHIELD_SEGB

#define SHIELD_SEGB   13

The pin connected to Segment B of the 7-Seg display.

◆ SHIELD_SEGC

#define SHIELD_SEGC   12

The pin connected to Segment C of the 7-Seg display.

◆ SHIELD_SEGD

#define SHIELD_SEGD   4

The pin connected to Segment D of the 7-Seg display.

◆ SHIELD_SEGE

#define SHIELD_SEGE   0

The pin connected to Segment E of the 7-Seg display.

◆ SHIELD_SEGF

#define SHIELD_SEGF   14

The pin connected to Segment G of the 7-Seg display.

◆ SHIELD_SEGG

#define SHIELD_SEGG   2

The pin connected to Segment F of the 7-Seg display.