GithubHelp home page GithubHelp logo

adafruit / adafruit-pwm-servo-driver-library Goto Github PK

View Code? Open in Web Editor NEW
457.0 46.0 304.0 264 KB

Adafruit PWM Servo Driver Library

License: Other

C++ 100.00%
arduino arduino-library pca9685 pwm pwm-driver servo-controller servo library

adafruit-pwm-servo-driver-library's Introduction

Adafruit PCA9685 PWM Servo Driver Library Build Status

This is a library for our Adafruit 16-channel PWM & Servo driver, shield or FeatherWing

Pick one up today in the adafruit shop!

These drivers use I2C to communicate, 2 pins are required to interface.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, check license.txt for more information.

All text above must be included in any redistribution

adafruit-pwm-servo-driver-library's People

Contributors

adammhaile avatar andydoro avatar bolukan avatar caternuson avatar driverblock avatar evaherrada avatar hoffmannjan avatar ladyada avatar larz99 avatar makermelissa avatar mrusme avatar paintyourdragon avatar per1234 avatar photodude avatar siddacious avatar tbolin avatar tdicola avatar thejenix avatar tyeth avatar waynepiekarski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit-pwm-servo-driver-library's Issues

¿se puede evitar que salga esto en la verificación o subida de un codigo de arduino? => ATENCIÓN: .github Espúrias carpetas en librería 'Adafruit PWM Servo Driver Library'

Thank you for opening an issue on an Adafruit Arduino library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Arduino projects check these very common issues to ensure they don't apply:

    • For uploading sketches or communicating with the board make sure you're using
      a USB data cable and not a USB charge-only cable. It is sometimes
      very hard to tell the difference between a data and charge cable! Try using the
      cable with other devices or swapping to another cable to confirm it is not
      the problem.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and plug in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

    • Ensure you are using an official Arduino or Adafruit board. We can't
      guarantee a clone board will have the same functionality and work as expected
      with this code and don't support them.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Arduino board: INSERT ARDUINO BOARD NAME/TYPE HERE

  • Arduino IDE version (found in Arduino -> About Arduino menu): INSERT ARDUINO
    VERSION HERE

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LIST REPRO STEPS BELOW

Compiling for ATtiny85

Hello.

I'm trying to connect a Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685 to Adafruit Trinket 5V (ATtiny85 @ 8MHz) through I2C. Currently using Arduino 1.8.5 (Mac OS X).

The Trinket doesn't allow Serial with the standard "Wire.h" Arduino library. I saw, with the same error as me, this post:
#34
And I tried with the specific "Wire" library:
https://github.com/adafruit/Adafruit_Arduino_Boards/tree/master/libraries/Wire
But still no success. I'm pretty positive the compiler is loading the correct library, since it's the one set under Doc/Arduino/libraries.

Any work around you can think of?

Change for issue #11 does not address the root cause

Hi, I don't think the change for Issue #11 is correct to fix the overshoot problem. I think the real problem is that the arithmetic used to calculate the prescale doesn't do the rounding step described in the data sheet. This can lead to the prescale value being too small, which will indeed overshoot the frequency.

Consider setting a frequency of 200Hz (the chip's default). With the non-rounding arithmetic in the existing driver, you get:

(25000000 / (4096 * 200)) - 1 = 29

...which is NOT the default value of the prescale register. And it shows the overshoot if you work the math the other direction:

(25000000 / 29) / 4096 = 210

To really fix it, you need to do the rounding step. This can easily be done by scaling the clock frequency by 100 before calculating the prescale, checking to see if a round-up is required, and then dividing the resulting prescale by 100:

uint32_t prescale = (25000000 * 100) / (4096 * 200);
if ((prescale % 100) >= 50)
    prescale += 100;
prescale = (prescale / 100) - 1;

In the first step, prescale is 3051, in the second step it becomes 3151, and in the last step it becomes (31 - 1), i.e. 30, which is the default value of the prescale register for the documented 200Hz default.

Working that math forward, we can see that the frequency is much closer to what was intended:

(25000000 / 30) / 4096 = 203

I don't think simply setting the frequency to 90% of what the user requested is the right way to solve the problem.

getPWM returns random numbers

I realized that I was getting garbage values and so reverted to a very basic code.
`void setup() {
Serial.begin(9600);
Serial.println("8 channel Servo test!");
pwm.begin();
pwm.setPWMFreq(50);
delay(10);
}

void loop() {
if (Serial.available())
pwm.setPWM(0, 0, Serial.parseInt());

delay(2500);
uint8_t pwmout = pwm.getPWM(0);
Serial.println(pwmout);
}`
I have tried just printing out the value and also typecasting it to char.
I am using a MG996R servo.

I just kept getting values like 4, 6, 19, 224 etc.

Library won't compile with -pedantic flag: `error: call of overloaded 'requestFrom(uint8_t, int, uint8_t)' is ambiguous`

  • Arduino board: Arduino Uno (Rev 3)

  • Arduino IDE version (found in Arduino -> About Arduino menu): Arduino.mk 1.6.0

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): Simply include the library and compile with CXXFLAGS += -pedantic

Output:

Arduino.mk Configuration:
- [AUTODETECTED]       CURRENT_OS = MAC 
- [USER]               ARDUINO_DIR = /Applications/Arduino.app/Contents/Java 
- [USER]               ARDMK_DIR = /usr/local/Cellar/arduino-mk/1.6.0 
- [AUTODETECTED]       ARDUINO_VERSION = 189 
- [DEFAULT]            ARCHITECTURE = avr 
- [DEFAULT]            ARDMK_VENDOR = arduino 
- [AUTODETECTED]       ARDUINO_PREFERENCES_PATH = /home/x/Library/Arduino15/preferences.txt 
- [AUTODETECTED]       ARDUINO_SKETCHBOOK = /home/x/Projects/Arduino (from arduino preferences file)
- [USER]               AVR_TOOLS_DIR = /usr/local 
- [COMPUTED]           ARDUINO_LIB_PATH = /Applications/Arduino.app/Contents/Java/libraries (from ARDUINO_DIR)
- [COMPUTED]           ARDUINO_PLATFORM_LIB_PATH = /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries (from ARDUINO_DIR)
- [COMPUTED]           ARDUINO_VAR_PATH = /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants (from ARDUINO_DIR)
- [COMPUTED]           BOARDS_TXT = /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/boards.txt (from ARDUINO_DIR)
- [USER]               USER_LIB_PATH = /home/x/Projects/y/z/software/arduino_uno/dragonfly//lib 
- [DEFAULT]            PRE_BUILD_HOOK = pre-build-hook.sh 
- [USER]               BOARD_TAG = uno 
- [COMPUTED]           CORE = arduino (from build.core)
- [COMPUTED]           VARIANT = standard (from build.variant)
- [USER]               OBJDIR = /home/x/Projects/y/z/software/arduino_uno/dragonfly//bin/uno/dragonfly 
- [COMPUTED]           ARDUINO_CORE_PATH = /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino (from ARDUINO_DIR, BOARD_TAG and boards.txt)
- [USER]               MONITOR_BAUDRATE = 115200 
- [DEFAULT]            OPTIMIZATION_LEVEL = s 
- [DEFAULT]            MCU_FLAG_NAME = mmcu 
- [USER]               CFLAGS_STD = -std=gnu11 
- [USER]               CXXFLAGS_STD = -std=gnu++11 
- [COMPUTED]           DEVICE_PATH = /dev/cu.usbmodem* (from MONITOR_PORT)
- [DEFAULT]            FORCE_MONITOR_PORT =  
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
-
-                      ARDUINO_LIBS =
- [USER]                 Adafruit_PWM_Servo_Driver_Library
- [PLATFORM]             Wire
- [COMPUTED]           BOOTLOADER_PARENT = /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/bootloaders (from ARDUINO_DIR)
- [COMPUTED]           ARDMK_VERSION = 1.5 
- [COMPUTED]           CC_VERSION = 9.1.0 (avr-gcc)
-------------------------
mkdir -p /home/x/Projects/y/z/software/arduino_uno/dragonfly//bin/uno/dragonfly
/usr/local/bin/avr-g++ -x c++ -include Arduino.h -MMD -c -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=189 -DARDUINO_ARCH_AVR -D__PROG_TYPES_COMPAT__ -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino
.app/Contents/Java/hardware/arduino/avr/variants/standard    -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src   -I/home/x/Projects/y/z/software/arduino_uno/dragonfly//lib/Adafruit_PWM_Servo_Driver_
Library -Wall -ffunction-sections -fdata-sections -Os -pedantic -Wall -Wextra -fpermissive -fno-exceptions -std=gnu++11 dragonfly.ino -o /home/x/Projects/y/z/software/arduino_uno/dragonfly//bin/uno/dragonfly/dragonfly.ino.o
/usr/local/bin/avr-g++ -MMD -c -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=189 -DARDUINO_ARCH_AVR -D__PROG_TYPES_COMPAT__ -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardwar
e/arduino/avr/variants/standard    -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src   -I/home/x/Projects/y/z/software/arduino_uno/dragonfly//lib/Adafruit_PWM_Servo_Driver_Library -Wall -ffunction-s
ections -fdata-sections -Os -pedantic -Wall -Wextra -fpermissive -fno-exceptions -std=gnu++11 /home/x/Projects/y/z/software/arduino_uno/dragonfly//lib/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.cpp -o /home/x/Pr
ojects/y/z/software/arduino_uno/dragonfly//bin/uno/dragonfly/userlibs/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.cpp.o
/home/x/Projects/y/z/software/arduino_uno/dragonfly//lib/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.cpp: In member function 'uint8_t Adafruit_PWMServoDriver::getPWM(uint8_t)':
/home/x/Projects/y/z/software/arduino_uno/dragonfly//lib/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.cpp:167:71: error: call of overloaded 'requestFrom(uint8_t, int, uint8_t)' is ambiguous
  167 |   _i2c->requestFrom((uint8_t)_i2caddr, LED0_ON_L + 4 * num, (uint8_t)4);
      |                                                                       ^
In file included from /home/x/Projects/y/z/software/arduino_uno/dragonfly//lib/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.h:27,
                 from /home/x/Projects/y/z/software/arduino_uno/dragonfly//lib/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.cpp:30:
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:62:13: note: candidate: 'uint8_t TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)'
   62 |     uint8_t requestFrom(uint8_t, uint8_t, uint8_t);
      |             ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:65:13: note: candidate: 'uint8_t TwoWire::requestFrom(int, int, int)'
   65 |     uint8_t requestFrom(int, int, int);
      |             ^~~~~~~~~~~
make: *** [/home/x/Projects/y/z/software/arduino_uno/dragonfly//bin/uno/dragonfly/userlibs/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.cpp.o] Error 1

getpwm

hi

I want to get the position of servo. but there is no getpwm
why?

tanks

Program may freeze if hardware fails.

Working with the PCA9685 often gave me a software crashing problem. The cause was faulty wiring, but the real problem is that the functions of this library do no seem to return when that is the case. This causes any program to hang. If I would touch the wires, suddenly the program would go on.

i2c pin

hi,

can i suggest to add i2c pins to begin constructor? in that way, non standard controller are able to use the library without need to modify it.

some esp8266 are limited and have to reuse pins for i2c, so using Wire.begin(x,y) can be quite useful.

Change constructor arguments

Hi,

I have 2 minor improvments to the constructors:

  1. Please remove the const attribute from the address argument because it is not needed.
  2. Please replace the TwoWire &i2c with TwoWire *i2c - this makes sense because you save this as a pointer here anyway.

Thanks!

cannot find wiring diagram

Hi, where can people find a wiring diagram? In the comments it says one needs two pins but .. what are the default pins?

Thanks in advance

Note: I´m using it with a nodeMCU Lolin board

Servo timing is wrong in example for regular servo's like sg90.

Concerns:
The example for the servo sweep in ./examples/servo/servo.ino

Expected:
Either the PWM values match the timing for the usec's below
or that they list the regular values seen with servos with the cycle time of 20 msec.
Which means a sweep between 500 and 2500 usec.

Observed:
This oversteered the maximum voltage for one of my servo's and it went spinning.
Also the maximum lower angle was not met.
The current values match the following timing

#define SERVOMIN  150  // (150 / 4096) * 20e3 = 732 usec
#define SERVOMAX  600  // (600 / 4096) * 20e3 = 2930 usec
#define USMIN  600 // These do not correspond to the calculated values above
#define USMAX  2400 //  These do not correspond to the calculated values above

Proposed:
Make the timing for the example sweep between 500 and 2500 usec.
like for instance:

#define SERVOMIN 102   // ( 500 / 20000 ) * 4096
#define SERVOMID 307   // ( 1500 / 20000 ) * 4096
#define SERVOMAX 491   // ( 2500 / 20000 ) * 4096
#define USMIN  500
#define USMAX 2500

You could change these values to sweep between 600 and 2400 usec like in the original example.
But at least keep it consistent and show how to calculate the values.

Frequency accuracy issue

The current code (which seems to agree with the datasheet) overshoots the requested frequency by a factor of 1/0.9.

If I add "freq *= 0.9;" at the top of Adafruit_PWMServoDriver::setPWMFreq, the frequency and requested pulse widths (measured on an oscilloscope) are correct.

The correction factor seems to be the same regardless of the requested frequency (tested from 50Hz to 100Hz)

Serial Communication Adafruit_PWMServoDriver

For our project we are using the adafruitPWMservodriver library. We are using the Arduino Mega 2560 in combination of the servoshield 16 x12 bits PWM. We want to use serial communication to send the motor positions to the servo. We want to send the commands using MATLAB/ Simulink. The command we send is :UU123456 (UU followed by 6 motor positions). We are sending the data as uint8. The code we are using to read the data is, but this shouldn't have any problems:
void serialEvent() {

if (Serial.available()>0) {

digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
// get the new byte array:
char inChar = Serial.readBytes(readStream, 8);

}
}

We think the fault lies in the way we are sending the data. Does anyone have any advice or insight?

writeMicroseconds(uint8_t num, uint16_t Microseconds) sends wrong number of PCA9685 ticks

Hi All,
The function writeMicroseconds(uint8_t num, uint16_t Microseconds) calculates and sends to the PCA9685 chip a number of ticks that the output signal to be ON from the beginning of the PCA9685 chip pwm cycle, as follows:

pulse /= pulselength;  
setPWM(num, 0, pulse);

Please note that PCA9685 counter starts from 0 so the number of ticks passed to the chip shall be reduced by 1 a per the data sheet section 7.3.3 , example 1. So the code to be updated a follows:

setPWM(num, 0, pulse-1);

Otherwise the exiting code produces a pulse which has one extra tick and therefore an incorrect length in microseconds.

P.S. It would be also good to add data validation to setPWM(uint8_t num, uint16_t on, uint16_t off) function before sending data to the chip:

   //validate the values 
   on=(uint16_t)constrain(on,0,4096);
   off=(uint16_t)constrain(off,0,4096);

Regarding sleep-mode

While porting this library onto another platform I noticed some weird things inside the code which I could not explain to myself. Hence I'm writing this issue to clarify how exactly this is intended to work and whether these might indeed be bugs.

This library defines dedicated sleep and wakeup methods. However, it looks like, during setPWMFreq a redundant implementation for putting the shield – a 1411 in my case – into sleep mode is being used.

In addition to what seems to be duplicate code, it seems like the code either does not work on Arduino the way it's intended to or there is some other magic happening that allows you to setPWMFreq and thereby put the shield to sleep but then still be able to directly setPWM without explicitly waking it up again. Frankly speaking, I don't understand how this code works on Arduino, but I've tested it myself on an Uno and a Mega2560 and both worked with the linked example.

However, while porting to a different (3.3V operated) platform the shield did not accept any requests for setting the PWM at all while in sleep mode. Only when calling wakeup (between setPWMFreq and setPWM) it would accept the frequency and rotate the servo accordingly.

Maybe someone could explain to me how this code is intended to work and why it does work on Arduino even though the shield is apparently put to sleep right at the beginning? One uneducated guess might be, that the sleep mode itself does not work for this shield while it's being connected to an Arduino, hence there is no need to actually wake it up again.

Thanks in advance!

setPWM description is incomplete/misleading

According to the library reference this function sets the start and end of the high segment of the pulse.

In the provided example, the pair (1024, 3072) produces a high pulse at 25% (1024) and then remains low for the last 25% of the pulse. It should be clarified and or emphasised that this refers to the HIGH PULSE effectively producing a 50% total duty, cycle, as seen in the following DSO capture (please pay attention to the cursors):

SDS00001

HOWEVER the PWM train should be observed as the following wave (pay attention to the new location of the cursors):

SDS00002

which is in line with the textual description:

"The following example will cause channel 15 to start low, go high around 25% into the pulse (tick 1024 out of 4096), transition back to low 75% into the pulse (tick 3072), and remain low for the last 25% of the pulse"

It is prone to confuse newcomers and somewhat advanced users.

This is what the device spits out with the debug mode enabled:

image

So, if you want to implement a function to set a duty cycle from 0% to 100%, you could do something like this:

/**
 * @brief Set the duty cycle for any channel
 *
 * @param pin [0,15] port to drive
 * @param duty [0,100] 12-bit driving value
 * 
 */
void setLowSideDuty(uint8_t pin, uint8_t duty) {

  double onDuty, offDuty;

  onDuty = ceil(LO_SIDE_ON_DUTY * (duty / 100.0));    // LO_SIDE_ON_DUTY is 4096
  offDuty = ceil(LO_SIDE_ON_DUTY - onDuty);

#ifdef DEBUG_ENABLE

  Serial.print("Desired duty:");
  Serial.print(duty);
  Serial.println("%");

  Serial.print("On:");
  Serial.println((uint16_t)onDuty);

  Serial.print("Off:");
  Serial.println((uint16_t)offDuty);
  
#endif

  controller.pwm.setPWM(pin, 0, (uint16_t)onDuty);
  
}

then simply use:

 setLowSideDuty(15, 42);  

SDS00003

Perhaps, a couple of voltammograms along with a clearer description might help a lot.

Cheers

EDIT: Added a comment on the macro value I used in my example code

Please fix the library due to changes in ESP8266 Core Version: 2.4.0

This issue closed here: esp8266/Arduino#4096
Please, fix the code. Thanks.

Sketch

The sketch doesn't compile.
Core Version: 2.4.0

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();



void setup(void) {
  Wire.begin(5, 14);
  Wire.setClock(100000);


  pwm.begin();
  pwm.setPWMFreq(1600);
}

void loop(void) {              
  
}

Debug Messages

Arduino: 1.8.5 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 160 MHz, 4M (1M SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 256000"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\DEYMOS\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\DEYMOS\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\DEYMOS\Documents\Arduino\libraries -fqbn=esp8266:esp8266:nodemcuv2:CpuFrequency=160,FlashSize=4M1M,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,UploadSpeed=256000 -ide-version=10805 -build-path C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778 -warnings=none -build-cache C:\Users\DEYMOS\AppData\Local\Temp\arduino_cache_844963 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.esptool.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.12 -prefs=runtime.tools.mkspiffs.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\0.2.0 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2 -verbose C:\Users\DEYMOS\Desktop\SmartHomeV3_Stable\SmartHomeV3_Stable.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\DEYMOS\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\DEYMOS\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\DEYMOS\Documents\Arduino\libraries -fqbn=esp8266:esp8266:nodemcuv2:CpuFrequency=160,FlashSize=4M1M,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,UploadSpeed=256000 -ide-version=10805 -build-path C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778 -warnings=none -build-cache C:\Users\DEYMOS\AppData\Local\Temp\arduino_cache_844963 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.esptool.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.12 -prefs=runtime.tools.mkspiffs.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\0.2.0 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2 -verbose C:\Users\DEYMOS\Desktop\SmartHomeV3_Stable\SmartHomeV3_Stable.ino
Using board 'nodemcuv2' from platform in folder: C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0
Using core 'esp8266' from platform in folder: C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0
Detecting libraries used...
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire\Wire.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp" -o "nul"
Generating function prototypes...
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp.o"
Compiling libraries...
Compiling library "Wire"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire\Wire.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\libraries\Wire\Wire.cpp.o"
Compiling library "Adafruit-PWM-Servo-Driver-Library-master"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp.o"
C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp: In member function 'void Adafruit_PWMServoDriver::setPin(uint8_t, uint16_t, bool)':

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: error: no matching function for call to 'min(uint16_t&, int)'

   val = min(val, 4095);

                      ^

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note: candidates are:

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)

     min(initializer_list<_Tp> __l, _Compare __comp)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'short unsigned int'

   val = min(val, 4095);

                      ^

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)

     min(initializer_list<_Tp> __l)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'short unsigned int'

   val = min(val, 4095);

                      ^

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)

     min(const _Tp& __a, const _Tp& __b, _Compare __comp)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int')

   val = min(val, 4095);

                      ^

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)

     min(const _Tp& __a, const _Tp& __b)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int')

   val = min(val, 4095);

                      ^

Using library Wire at version 1.0 in folder: C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire 
Using library Adafruit-PWM-Servo-Driver-Library-master at version 1.0.1 in folder: C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master 
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

setServoPulse method in servo.ino has math error

Does the ServoPulse method in servo.ino have an error of a factor of 1000? According to the comment, the input is expected in Seconds (which is an odd expectation, given that servos are specced in ms (microseconds))

`// you can use this function if you'd like to set the pulse length in seconds
// e.g. setServoPulse(0, 0.001) is a ~1 millisecond pulse width. its not precise!
void setServoPulse(uint8_t n, double pulse) {
double pulselength;

pulselength = 1000000; // 1,000,000 us per second
pulselength /= 60; // 60 Hz
Serial.print(pulselength); Serial.println(" us per period");
pulselength /= 4096; // 12 bits of resolution
Serial.print(pulselength); Serial.println(" us per bit");
pulse *= 1000;
pulse /= pulselength;
Serial.println(pulse);
pwm.setPWM(n, 0, pulse);
}`

First of all, the method has 60Hz hard coded in (why?), so pulselength = (1,000,000 us / 60 * 4096) = 4.069010416666667, meaning pulselength is about 4 _micro_seconds. Great so far, not sure why we are using microseconds, but sure. Now we read in our pulse. Per the example comment, lets say it is 1 _milli_second, so the value of the parameter is .001

Now (pulse * 1000)/pulselength = .001 * 1000 / 4.069010416666667 = 0.24576

Our pulse for pwm.setPWM(n, 0, pulse) is less than one unit of our 4096? Wouldnt this round to 0, meaning no pulse time? My understanding, and the rest of the example indicate that the pulse time should be a few hundred units. This forum post here is how I understand the timing. https://forums.adafruit.com/viewtopic.php?f=50&t=103718#p519073

According to that formula, each period of a 60Hz cycle is 1000/60ms, so 16.6667ms. We want our pulse to be 1ms of each of these 16.6667ms cycles, which are broken into 4096 segments, thus (1/16.666)*4096 = 245.7609830439322, exactly 1000 times the value given by the algorithm, and well within the seeming range listed in the rest of the sketch.

In the servo.ino example, is the ServoPulse method off by a factor of 1000, or am I misunderstanding?

Does the ServoPulse method in servo.ino have an error of a factor of 1000? According to the comment, the input is expected in Seconds (which is an odd expectation, given that servos are typically specced in microseconds)

// you can use this function if you'd like to set the pulse length in seconds
// e.g. setServoPulse(0, 0.001) is a ~1 millisecond pulse width. its not precise!
void setServoPulse(uint8_t n, double pulse) {
  double pulselength;
  
  pulselength = 1000000;   // 1,000,000 us per second
  pulselength /= 60;   // 60 Hz
  Serial.print(pulselength); Serial.println(" us per period"); 
  pulselength /= 4096;  // 12 bits of resolution
  Serial.print(pulselength); Serial.println(" us per bit"); 
  pulse *= 1000;
  pulse /= pulselength;
  Serial.println(pulse);
  pwm.setPWM(n, 0, pulse);
}

First of all, the method has 60Hz hard coded in (rather than taking this value from the set frequency) , so pulselength = (1,000,000 us / 60 * 4096) = 4.069010416666667, meaning pulselength is about 4 microseconds. Great so far, not sure why we are using microseconds, but sure. Now we read in our pulse. Per the example comment, lets say it is 1 millisecond, so the value of the parameter is .001

Now (pulse * 1000)/pulselength = .001 * 1000 / 4.069010416666667 = 0.24576

Our pulse for pwm.setPWM(n, 0, pulse) is less than one unit of our 4096? Wouldnt this round to 0, meaning no pulse time? My understanding, and the rest of the example indicate that 'pulse' should be in the order of a few hundred.

This forum post here is how I understand the timing of this controller https://forums.adafruit.com/viewtopic.php?f=50&t=103718#p519073
According to that formula, each period of a 60Hz cycle is 1000/60ms, so 16.6667ms. We want our pulse to be 1ms of each of these 16.6667ms cycles, which are broken into 4096 segments, thus (1/16.666)*4096 = 245.7609830439322, exactly 1000 times the value given by the algorithm, and well within the seeming range listed in the rest of the sketch. Am I missing something, or this this a case of mixed units? It seems like the intention was to take an input in milliseconds, but the comment clearly indicates seconds, and correctly computes that a 1 millisecond input should be entered as .001 if the expected units is indeed seconds.

Adafruit_PWMServoDriver::setPWM returns 0 not endTransmission response

Using ESP32 and VSCode with PlatformIO, but this issue doesn't relate to any particular board/IDE.

Adafruit_PWMServoDriver::setPWM documentation states that it returns the result from endTransmission, but in fact always returns 0.

* @return result from endTransmission

vs.

It would be good if either the documentation reflected reality, or even better if it actually returned the endTransmission response to allow for detection of errors. This would be similarly useful for Adafruit_PWMServoDriver::writeMicroseconds and Adafruit_PWMServoDriver::setPin.

prescale/frequency locked with Library reuse/wrapping of Adafruit 16-channel PWM/Servo

I'm working with the Adafruit PCA9685 16-Channel Servo Driver and I'm rewriting this ESC library to replace the servo library with the adafruit/Adafruit-PWM-Servo-Driver-Library with this I2C PWM extender. I've tried two different methods (simple object creation like the library I'm rewriting, and full wrapping of all functions) and ended up with the same frequency issue, the I2C PWM extender frequency gets locked to about 24 Hz and will not change. originally opened in the forums

  • Arduino board: Uno

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.9

  • Adafruit-PWM-Servo-Driver-Library version: master branch

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LIST REPRO STEPS BELOW

  1. Write a .h Library header file that creates a class with private object of this library
Adafruit_PWMServoDriver servo = Adafruit_PWMServoDriver(0x40);
  1. Use the servo object in the Library .cpp methods
void myClass::speed(int speed)
{
writeSpeed = constrain(speed, 1000, 2000);
servo.writeMicroseconds(writeSpeed);
}
  1. Use this new library in a sketch as per the examples with setup begin set the frequency 60hz, etc
  • check the frequency

the expected frequency is 60hz as set
The actual frequency is about 24hz and will not change

I'm at a lost as to why the chip gets frequency locked from creating an object in another library.

Included files are the last attempt at wrapping the library and the associated sketch to use the wapper library
ESC.zip

No output if PWM freq not set

The setPWM function doesn't work unless users first call setPWMFreq. So while example sketches work, if users attempt to use the library with the PWM frequency left at default nothing will work.

It could probably be fixed by setting the Auto-Increment bit of the MODE1 register in begin(), perhaps right after that call to reset().

AS/Atmega library or examples?

The examples appear to be Arduino only. I tried porting to Atmel Studio for Atmega 328P and got a "recipe" error.

Any working examples for Atmel Studio?

Documentation is missing

The product page said the library was documented and had examples. I do see the examples, but I can't seem to find the documentation.

Support for Arduino Micro / Leonardo

Examples compile, deploy, and run on Arudino UNO without problems... examples will compile, deploy, but will not run on Arduino Micro or Leonardo.

Doesn't build

I'm not troubleshooting, but instead explaining that your examples do not even build. Is this maintained?

Example file: Servo
Arduino 1.8.13
ESP32 1.0.6

C:\My Documents\Downloads\Adafruit-PWM-Servo-Driver-Library-master\examples\servo\servo.ino: In function 'void loop()':
servo:103:9: error: 'class Adafruit_PWMServoDriver' has no member named 'writeMicroseconds'
pwm.writeMicroseconds(servonum, microsec);
^
servo:108:9: error: 'class Adafruit_PWMServoDriver' has no member named 'writeMicroseconds'
pwm.writeMicroseconds(servonum, microsec);
^
exit status 1
'class Adafruit_PWMServoDriver' has no member named 'writeMicroseconds'

And after further edits...

libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::Adafruit_PWMServoDriver(unsigned char)': C:\My Documents\Arduino\libraries\Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.cpp:31: multiple definition of Adafruit_PWMServoDriver::Adafruit_PWMServoDriver(unsigned char)'
sketch\Adafruit_PWMServoDriver.cpp.o:sketch/Adafruit_PWMServoDriver.cpp:47: first defined here
libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::Adafruit_PWMServoDriver(unsigned char)': Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriverC2Eh+0x0): multiple definition of Adafruit_PWMServoDriver::Adafruit_PWMServoDriver(unsigned char)'
sketch\Adafruit_PWMServoDriver.cpp.o:Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriverC2Eh+0x0): first defined here
libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::setPWM(unsigned char, unsigned short, unsigned short)': Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver6setPWMEhtt+0x0): multiple definition of Adafruit_PWMServoDriver::setPWM(unsigned char, unsigned short, unsigned short)'
sketch\Adafruit_PWMServoDriver.cpp.o:Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver6setPWMEhtt+0x0): first defined here
libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::setPin(unsigned char, unsigned short, bool)': Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver6setPinEhtb+0x0): multiple definition of Adafruit_PWMServoDriver::setPin(unsigned char, unsigned short, bool)'
sketch\Adafruit_PWMServoDriver.cpp.o:Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver6setPinEhtb+0x0): first defined here
libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::read8(unsigned char)': Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver5read8Eh+0x0): multiple definition of Adafruit_PWMServoDriver::read8(unsigned char)'
sketch\Adafruit_PWMServoDriver.cpp.o:Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver5read8Eh+0x0): first defined here
libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::write8(unsigned char, unsigned char)': Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver6write8Ehh+0x0): multiple definition of Adafruit_PWMServoDriver::write8(unsigned char, unsigned char)'
sketch\Adafruit_PWMServoDriver.cpp.o:Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver6write8Ehh+0x0): first defined here
libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::reset()': Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver5resetEv+0x0): multiple definition of Adafruit_PWMServoDriver::reset()'
sketch\Adafruit_PWMServoDriver.cpp.o:Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver5resetEv+0x0): first defined here
libraries\Adafruit_PWM_Servo_Driver_Library\Adafruit_PWMServoDriver.cpp.o: In function Adafruit_PWMServoDriver::setPWMFreq(float)': Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver10setPWMFreqEf+0x0): multiple definition of Adafruit_PWMServoDriver::setPWMFreq(float)'
sketch\Adafruit_PWMServoDriver.cpp.o:Adafruit_PWMServoDriver.cpp:(.text._ZN23Adafruit_PWMServoDriver10setPWMFreqEf+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.

Argument to begin should not set external clock

  • Arduino board: Any
  • Arduino IDE version (found in Arduino -> About Arduino menu): Any
  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): NA
    Calling begin() with an argument will currently set the external prescaler and make the board use an external clock. As far as I know the external clock pin is not accessible on the standard board without modifications. Calling begin with an argument will therefore cause the board to not give any output under most circumstances. This could be confusing to people who are not familiar with the library that might call begin with an argument believing that they are setting the pwm frequency.

I suggest that the argument to begin is either removed or changed to setting the pwm frequency by calling setPWMFreq.

enable disable PWM

Would be great to have the ability to sleep/wakeup the board.
I had some strange issues with Servo motors. In some interval they slightly changed the position or vibrates in some positions.

For my case it is not needed to hold one value - I just drive the servo to one position and want to pause it (so no pwm/power is send)

Just add these little helper methods to send the board to sleep and wakeup again.
Maybe these methods would be great to have inside the lib:

void sleepServo() {
  uint8_t awake = read8(PCA9685_MODE1);
  uint8_t sleep = awake | 0x10; // set sleep bit high
  write8(PCA9685_MODE1, sleep);
  delay(5); // wait until cycle ends for sleep to be active
}

void wakeupServo() {
  uint8_t sleep = read8(PCA9685_MODE1);
  uint8_t wakeup = sleep & ~0x10; // set sleep bit low
  write8(PCA9685_MODE1, wakeup);
}

passing I2C address when creating Adafruit_PWMServoDriver resets Arduino

  • Arduino board: Arduino Uno and Mega 2560

  • Arduino IDE version: Arduino IDE 1.8.9 (Windows Store 1.8.21.0)

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too):

  1. Open Arduino IDE using Adafruit-PWM-Servo-Driver-Library v1.0.4.
  2. Open example sketch pwmtest.
  3. Compile and load pwmtest without any changes to Arduino and verify it runs as expected.
  4. Edit line 23 to use ANY I2C address, even default of 0x40. ie:
    Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x40);
  5. Compile and load modified example sketch to Arduino. Arduino will reset.
  6. Repeat steps with the example servo.

_oscillator_freq not initialized?

_oscillator_freq is a member variable but it's not initialized in the constructor.
If I understand correctly, begin(0) would then call setPWMFreq which uses that variable, and only after that it is set to the default value.

Calling setOscillatorFrequency before would probably defeat the purpose too, since it would be overwritten with the default.

Correct ATTiny85 Pins?

Hello

I'm using an ATTiny85. Which pins are SCL and SDA?

Your ReadMe says

SCL -> Analog 5

Same on the ATTiny85?

and

SDA -> Analog 4

But on the ATTiny85, P0 is marked "SDA". Should i use P0 or P4?

Thx

Method for setting push pull/open drain mode

The board is advertised as supporting both open drain and push-pull configurations for the output pins. The library currently does not expose this functionality.

I suggest that a setOutputMode method is added that can change the mode.

  • Arduino board: Any

  • Arduino IDE version (found in Arduino -> About Arduino menu): Any

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): NA

setPWM parameters?

It is unclear what the parameters of the setPWM method do, mean, or should be, as there is no commenting on that method. The first parameter is the pin number that the servo is connected to, but what are the other two supposed to be? They're called "on" and "off" but what do those numbers mean? What should calling this method actually do?

Thanks.

controlling servo speed

Hi there! Would be awesome to add functional to control speed of servo moving to the next deg. Probably, "Servosmooth" or "Varspeedservo" libraries can help.

Thanks!

Compiling for ATtiny85

I am trying to compile the servo.ino example for an ATtiny85 board, however there seems to be no I2C support despite trying various libraries and board cores.

I have tried this on Arduino IDE 1.6.12 and 1.8.5. I have tried using attiny cores from the following:
https://github.com/SpenceKonde/ATTinyCore
https://github.com/damellis/attiny

I have attempted to compile this while including Wire.h, TinyWireM.h, and TinyWire.h (one at a time of course). TinyWire.h (available at https://github.com/lucullusTheOnly/TinyWire) seems to be the newest code and is supposed to provide the I2C library via attiny's USI interface. When I attempt to verify the code, I get the following error message:

Arduino: 1.6.12 (Linux), Board: "ATtiny25/45/85, Disabled, CPU, ATtiny85, 8 MHz (internal), B.O.D. Disabled"

Build options changed, rebuilding all
In file included from /home/arduino/projects/attiny/PCA9685_test/PCA9685_test.ino:2:0:
/home/arduino/arduino-1.6.12/libraries/Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:53:35: error: expected ')' before '*' token
   Adafruit_PWMServoDriver(TwoWire *I2C, uint8_t addr = 0x40);
                                   ^
/home/arduino/arduino-1.6.12/libraries/Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:63:3: error: 'TwoWire' does not name a type
   TwoWire *_i2c;
   ^
exit status 1
Error compiling for board ATtiny25/45/85.

The readme for this library states that it is compatible with the attiny85. Could someone please provide updated directions on what libraries are required together in order to compile the examples for this servo driver board?

Weird bug: need to explicitly pass in pointer to Wire

Adafruit_PWMServoDriver(TwoWire *I2C = &Wire, uint8_t addr = 0x40);

I've just spent several hours trying to debug why my project stopped working after months of being fine.

for whatever reason (and this applies to the examples as well)

// called this way, it uses the default address 0x40
//Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x55);
// you can also call it with a different address you want
//Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x41);
// you can also call it with a different address and I2C interface
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(&Wire, 0x55);   // <--------

Only the last one worked... otherwise the arduino would be stuck in a boot loop and never make it past the pwm.begin().

I'd like to make a proposal that the initialiser is changed to a reference... my guess is that a hex number can be interpreted as a memory address and it is used as a pointer...

see this a5068e0#r34198800

How to set speed of servo?

Hi,

Currently, my servos are rotating (to the desired angle) so fast.

Could I set the rotation speed? If yes, please, how could i do that?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.