nanoI2CSlaveExpander
ARDUINO Nano v3 used as I2C slace digital and analog io expander for ESP8266 and others...
blink.ino
Go to the documentation of this file.
1 /**
2 * @file blink.ino
3 * @author J.Soranzo
4 * @date 5/01/2019
5 * @copyright 2019 CC0
6 * @version git_versionning
7 * @brief A little blink on output n°8 of how to use the project nanoI2CIOExpander
8 */
9 
10 
11 #include <nanoI2CIOExpLib.h>
12 
13 
15 
16 void setup(){
17  Serial.begin(9600);
18  Serial.println( "Nano I2C IO Expander Blink sample start.");
19  ioexp.begin();
20  Serial.println( "Init = " + String(CNanoI2CIOExpander::initOk?"ok":"ko") );
21  ioexp.test();
22  ioexp.pinMode( 8, OUTPUT );
23 
24 }
25 
26 void loop(){
27  ioexp.digitalWrite(8, HIGH);
28  delay( 500);
29  ioexp.digitalWrite(8, LOW);
30  delay( 500);
31 
32 }
void pinMode(int output, int mode)
A method to set the pinMode but...
void begin(int add=0x5F)
function that start the I2C protocol with nanoI2CIOExpander
void digitalWrite(int output, int value)
Header file of the class CNanoI2CIOExpander...
bool test()
A special test method that use 2 special register to write and read and display on the Serial monitor...
A class to provide usual io functioon for nanoI2CIOExpander project...