Posts

Showing posts from February, 2024

Week 5

 All about transistors https://noelpi.blogspot.com/2023/11/controlling-motor-with-transistor.html Programming Operators Conditional statements Next Week Normal stuff (pi, leads, 500 ohm resistor, motor , hbridge  L293D Dual Full Bridge Motor Driver IC )

Week 4

 Making a buzzer sound Discuss max current draws on the Raspberry Pi. V = IR For GPIO pins this means  3.3 = 0.016 R R= 3.3/0.016 R= 206.25 Ohms Therefore the lowest resistance we can have in a output circuit is 206.25 Ohms How to use the debugger to examine buzzer code. Using the "time" calls and turning the output pin on and off make the buzzer sound The buzzer sound is too low just using the GPIO pin so we need one of two things A transistor to amplify the signal from the GPIO pin without increasing the current draw on the GPIO pin A passive buzzer board that has a power and signal input. Extension activity making the buzzer sound using PWM What are the limits of changing the frequency.  Possible reasons why. Programming today Finish of variables from last week. Looping For, While Add up numbers 1-100 Using for loop Functions (intro)  Scope of blocks (counter inside function) use of the global keyword. Homework Using a while loop add Fibonacci numbers and output...

Week 3

  LED on off Extension Exercises. Change the ledonoff.py program to make the LED stay on for 3 seconds and off for 1 sec and for this cycle to repeat. Get the LED to display an SOS message repeatedly. There are rules to help people distinguish dots from dashes in Morse code. The length of a dot is 1 time unit. A dash is 3 time units. The space between symbols (dots and dashes) of the same letter is 1 time unit. The space between letters is 3 time units. The space between words is 7 time units. Equipment Usage How to use the power supply on the breadboard How to find specifications on the equipment purchased. Equipment List Python Programming Comments Variables Datatypes https://www.w3schools.com/python/ GPIO Pi specific programming https://www.raspberrypi.com/documentation/ https://sourceforge.net/p/raspberry-gpio-python/wiki/Home/ Pulse Width Modulation Control the amount of light output from an led Look at how to get inputs from the user in python Input validation.  Making y...

Week 2

Image
 Revision of Linux Find out which directory you are in. pwd list things in the directory ls telling directories from files colour in putty long listings to see permissions (into of sudo) ls -l listing all ls -a ls -la lists long for all files changing into a directory cd changing up a directory cd .. challenge changing into a directory above cd ../<directory> Output to text file > Output overwrite,  >>Output append Programming Using Thonny (more about debugging later) Using Nano Forgetting the u3a network so we can be sure it does not get priority.  sudo nano /etc/wpa_supplicant/wpa_supplicant.conf Hello World Program. Write 2 programs.  One using Thonny and one using nano.  Ensure that both work. Any faults (unlikely) here are probably because you have different keyboard encodings.  Do your inverted commas look funny? Reading Resistor Values from... https://eepower.com/resistor-guide/resistor-standards-and-codes/resistor-color-code/# Resisto...