12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #include "mbed.h"
- #include "main.h"
- #include "SWO.h"
- #include "pca9685.h"
- #include "tusb322.h"
- #include "ds3231.h"
- #include "ioc.h"
- #include "animation.h"
- I2C i2c(PA_10, PA_9);
- // SWO_Channel swo("swo");
- int main() {
-
- // Start I2C at 400kHz for DS3231
- i2c.frequency(400000);
-
- // Start with HV PSU disabled
- HV_EnableOutput(false);
-
- TUSB322_Init();
- PCA9685_Init();
-
- // Enable HV PSU
- HV_EnableOutput(true);
-
- // Set PCA9685 input voltage to highest possible
- PCA9685_SetVoltage(1.0);
-
- // swo.printf("CPU SystemCoreClock is %d Hz\r\n", SystemCoreClock);
-
- // Bump I2C frequency to 1MHz for PCA9685
- i2c.frequency(1000000);
- // PCA9685_SetDot(100);
- // PCA9685_SetDigit(3, 1, 100);
- // PCA9685_SetDigit(2, 3, 100);
- // PCA9685_SetDigit(1, 5, 100);
- // PCA9685_SetDigit(0, 7, 100);
- while(1) {
-
- Animate_Cycle_Basic();
- // Animate_Cycle_Analog();
- // Animate_Cycle_Low_Pwm();
- Animate_Cycle_Pwm();
- Animate_Cycle_Fade();
- Animate_Cycle_Fade_Random();
- Animate_Cycle_Fast();
- Animate_Cycle_Fast_Random();
- }
- }
|