Soft PWM + ADC ATmega 328p

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is a program for multiple servo motors, programmed 2 but the intention is to add more, the question is that it does not read the value of the potentiometer as I turn, I have to remove the power from the micro and put it back so that the servos move. Anyone who can know what's going on?

-Duty cycle: 0.5-2.5ms (1000-4000)

-Atmega328p

 

 

This topic has a solution.
Last Edited: Thu. Apr 9, 2020 - 10:04 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

There is no ADC_Read in the while loop.
Therefore, the variables servo1 and servo2 will never be changed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DO NOT START A SECOND THREAD.

 

Stay where you started on https://www.avrfreaks.net/forum/...

 

Locked.

 

Moderator

 

Ross McKenzie ValuSoft Melbourne Australia

Topic locked