aufgaben weil vergesen zu commiten
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
//
|
||||
//
|
||||
// Authors:
|
||||
// Peter Polidoro peterpolidoro@gmail.com
|
||||
// Peter Polidoro peter@polidoro.io
|
||||
// ----------------------------------------------------------------------------
|
||||
#include "Constants.h"
|
||||
|
||||
|
||||
namespace constants
|
||||
{
|
||||
const uint8_t device_address = 0x40;
|
||||
const size_t output_enable_pin = 2;
|
||||
const PCA9685::DeviceAddress device_address = 0x40;
|
||||
const PCA9685::Pin output_enable_pin = 2;
|
||||
|
||||
const size_t loop_delay = 100;
|
||||
const uint16_t frequency_increment = 10;
|
||||
const PCA9685::Frequency frequency_increment = 10;
|
||||
}
|
||||
|
||||
@@ -3,19 +3,20 @@
|
||||
//
|
||||
//
|
||||
// Authors:
|
||||
// Peter Polidoro peterpolidoro@gmail.com
|
||||
// Peter Polidoro peter@polidoro.io
|
||||
// ----------------------------------------------------------------------------
|
||||
#ifndef CONSTANTS_H
|
||||
#define CONSTANTS_H
|
||||
#include <Arduino.h>
|
||||
#include <PCA9685.h>
|
||||
|
||||
|
||||
namespace constants
|
||||
{
|
||||
extern const uint8_t device_address;
|
||||
extern const size_t output_enable_pin;
|
||||
extern const PCA9685::DeviceAddress device_address;
|
||||
extern const PCA9685::Pin output_enable_pin;
|
||||
|
||||
extern const size_t loop_delay;
|
||||
extern const uint16_t frequency_increment;
|
||||
extern const PCA9685::Frequency frequency_increment;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
PCA9685 pca9685;
|
||||
|
||||
uint16_t frequency_min;
|
||||
uint16_t frequency_max;
|
||||
uint16_t frequency;
|
||||
PCA9685::Frequency frequency_min;
|
||||
PCA9685::Frequency frequency_max;
|
||||
PCA9685::Frequency frequency;
|
||||
|
||||
void setup()
|
||||
{
|
||||
@@ -19,8 +19,8 @@ void setup()
|
||||
|
||||
pca9685.setOutputsNotInverted();
|
||||
|
||||
uint16_t time_min = pca9685.getTimeMin();
|
||||
uint16_t time_max = pca9685.getTimeMax();
|
||||
PCA9685::Time time_min = pca9685.getTimeMin();
|
||||
PCA9685::Time time_max = pca9685.getTimeMax();
|
||||
pca9685.setAllChannelsOnAndOffTime(time_min,time_max/4);
|
||||
|
||||
frequency_min = pca9685.getFrequencyMin();
|
||||
|
||||
Reference in New Issue
Block a user