SparkFun will be closed on Tuesday, December 24th, and Wednesday, December 25th, in observance of the Christmas holiday. Any orders qualifying for same day shipping placed after 2:00 p.m. (MST) on Monday, December 23rd, will be processed on Thursday, December 26th, when we return to regular business hours. Wishing you a safe and happy holiday from all of us at SparkFun!
Please note - we will not be available for Local Pick up orders from December 24th-December 27th. If you place an order for Local Pick-Up we will have those ready on Monday, December 30th.
Member Since: December 10, 2016
Country: India
Steps how to use Sparkfun SX1509 C++ Library on raspberry pi
you might be facing compilation errors when compiling SX1509 C++ library. Below are the few errors which i faced when compiling and steps to fix them.
Prerequisites
** To compile **
ERRORS
sx1509_registers.h:142:1: error: ‘uint8_t’ does not name a type uint8_t REG_I_ON[16] = {REG_I_ON_0, REG_I_ON_1, REG_I_ON_2, REG_I_ON_3, ^ sx1509_registers.h:147:1: error: ‘byte’ does not name a type byte REG_T_ON[16] = {REG_T_ON_0, REG_T_ON_1, REG_T_ON_2, REG_T_ON_3, ^
* Open the file sx1509_registers.h and replace "byte" with "unsigned char"
* and execute the command above.
* It should compile successfully and generate an object file "SparkFunSX1509.o" for you.
**Generate an archive library using "SparkFunSX1509.o" **
** Compile the demo file available in the ** github
* g++ main.cpp -o demo SparkFunSX1509.a -lwiringPi -lpthread -std=gnu++11
Demo executable is generated now successfully. Now you can run it on raspberry pi and explore more capabilities of SX1509 I/O Expander Breakout board
Steps how to use Sparkfun SX1509 C++ Library on raspberry pi
you might be facing compilation errors when compiling SX1509 C++ library. Below are the few errors which i faced when compiling and steps to fix them.
Prerequisites
** To compile **
ERRORS
sx1509_registers.h:142:1: error: ‘uint8_t’ does not name a type uint8_t REG_I_ON[16] = {REG_I_ON_0, REG_I_ON_1, REG_I_ON_2, REG_I_ON_3, ^ sx1509_registers.h:147:1: error: ‘byte’ does not name a type byte REG_T_ON[16] = {REG_T_ON_0, REG_T_ON_1, REG_T_ON_2, REG_T_ON_3, ^
* Open the file sx1509_registers.h and replace "byte" with "unsigned char"
* and execute the command above.
* It should compile successfully and generate an object file "SparkFunSX1509.o" for you.
**Generate an archive library using "SparkFunSX1509.o" **
** Compile the demo file available in the ** github
* g++ main.cpp -o demo SparkFunSX1509.a -lwiringPi -lpthread -std=gnu++11
Demo executable is generated now successfully. Now you can run it on raspberry pi and explore more capabilities of SX1509 I/O Expander Breakout board
No public wish lists :(