Library for interfacing with the NXP PCA9685 PWM controller over an I2C connection. Designed with the Adafruit breakout board (of the same name) in mind.

Dependents:   Hexapod_Library main_robot_gant_v22

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers definitions.h Source File

definitions.h

00001 #ifndef PCA9685_LIBRARY_DEFINITIONS_H
00002 #define PCA9685_LIBRARY_DEFINITIONS_H
00003 
00004 #define ADDR 0x80
00005 
00006 #define MODE1 0x0
00007 #define MODE2 0x1
00008 #define PRESCALE 0xFE
00009 
00010 #define LED0_ON_L 0x6
00011 #define LED0_ON_H 0x7
00012 #define LED0_OFF_L 0x8
00013 #define LED0_OFF_H 0x9
00014 
00015 #define ALLLED_ON_L 0xFA
00016 #define ALLLED_ON_H 0xFB
00017 #define ALLLED_OFF_L 0xFC
00018 #define ALLLED_OFF_H 0xFD
00019 
00020 #define OSC_CLOCK 25e6
00021 
00022 #define PWM_SCALER 0.90425 //set by manual calibration - ratio of FREQUENCY_SET:ACTUAL_OUTPUT
00023 
00024 #endif