Posts

Showing posts from October, 2022

Pull Down and Pull Up Resistors

Image
  From https://youtu.be/Bqk6M_XdIC0

Pulse Width Modulation and Servo Motors

Image
  Wiki Article From https://en.wikipedia.org/wiki/Servo_control#/media/File:Servomotor_Timing_Diagram.svg Now for a cycle of 50 Hz this means..... 1.5ms = 20ms  * x/100(where x is the duty cycle)  x = 7.5% duty cycle for 0 position For 90 degree position 2ms = 20ms * x/100 x = 10% duty cycle For -90 degree position 1ms = 20ms * x/100 x = 5%

Github and code

Image
Setting up your computer to interact with GitHub  Get the Code (using git on the command line)  in Linux and Mac Prepare a folder where you want to put the code. mkdir <directory> Change the permissions to allow you to read write and execute on that directory. chmod ugo=rxw <directory>   Clone the repository from github (requires pi connected to the net) git clone https://github.com/woodno/raspberry.git Whenever you want to update your code use... git pull Get the Code  (using git on the command line)  in Windows Find out if you have git installed by opening a console and typing  git --version If this works you have git installed.  If not follow step 2 You may need to install git for windows. https://gitforwindows.org/ Go to a directory you have created ready to hold your python code. Download the code with... git clone https://github.com/woodno/raspberry.git Whenever you want to update your code use... git pull Using s...