arduino-libraries / Servo

Servo Library for Arduino
http://arduino.cc/
GNU Lesser General Public License v2.1
257 stars 263 forks source link

Support angle and microseconds for nrf52, renesasm stm32f4 #135

Open thomashargrove opened 1 month ago

thomashargrove commented 1 month ago

Address issue #133

I tested this with an Arduino UNO R4 Wifi. With the code change I get the same scope output for both of these:

  myservo.writeMicroseconds(1500);              // tell servo to go to position in variable 'pos'
  delay(1000);                       // waits 15ms for the servo to reach the position
  myservo.write(1500);              // tell servo to go to position in variable 'pos'
  delay(1000);       

I don't have an nrf52 or stm32f4 board. I compiled the nrf52 target and there were no errors. I installed the board manager for stm32 but it seems to ship with its own Servo library.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 1 month ago

Memory usage change @ db471fdd4c047d191e3f01daca1ad7549c376d49

Board flash % RAM for global variables %
arduino:avr:leonardo 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:avr:mega 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:avr:nano 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:mbed_portenta:envie_m7:target_core=cm4 N/A N/A N/A N/A
arduino:megaavr:nona4809 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:sam:arduino_due_x_dbg 0 - 0 0.0 - 0.0 N/A N/A
arduino:samd:mkrzero 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table Board|`examples/Knob`
flash|%|`examples/Knob`
RAM for global variables|%|`examples/Sweep`
flash|%|`examples/Sweep`
RAM for global variables|% -|-|-|-|-|-|-|-|- `arduino:avr:leonardo`|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:avr:mega`|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:avr:nano`|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:mbed_nano:nano33ble`|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:mbed_nano:nanorp2040connect`|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:mbed_portenta:envie_m7`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A `arduino:mbed_portenta:envie_m7:target_core=cm4`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A `arduino:megaavr:nona4809`|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:sam:arduino_due_x_dbg`|0|0.0|N/A|N/A|0|0.0|N/A|N/A `arduino:samd:mkrzero`|0|0.0|0|0.0|0|0.0|0|0.0
Click for full report CSV ``` Board,examples/Knob
flash,%,examples/Knob
RAM for global variables,%,examples/Sweep
flash,%,examples/Sweep
RAM for global variables,% arduino:avr:leonardo,0,0.0,0,0.0,0,0.0,0,0.0 arduino:avr:mega,0,0.0,0,0.0,0,0.0,0,0.0 arduino:avr:nano,0,0.0,0,0.0,0,0.0,0,0.0 arduino:mbed_nano:nano33ble,0,0.0,0,0.0,0,0.0,0,0.0 arduino:mbed_nano:nanorp2040connect,0,0.0,0,0.0,0,0.0,0,0.0 arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A arduino:mbed_portenta:envie_m7:target_core=cm4,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A arduino:megaavr:nona4809,0,0.0,0,0.0,0,0.0,0,0.0 arduino:sam:arduino_due_x_dbg,0,0.0,N/A,N/A,0,0.0,N/A,N/A arduino:samd:mkrzero,0,0.0,0,0.0,0,0.0,0,0.0 ```