User Tools

Site Tools


notes:c4eng:fall2022:projects:sss1

WIRINGPI REVIEW

Remember to set pins used to output mode.

pinMode (pin[X], OUTPUT);

pin[X] is assuming you have a pin array set up.

PINMODE

DIGITALWRITE

From the function name we can assume that it writes some value, and this value will be in the form of 0 and 1. In other words we can say that this function is mainly used to control any device attached to the Pi by assigning value to the pin to which that respective device is attached. For using this function, we have to follow the syntax given below:

digitalWrite(pin, value); To use the digitalWrite() function we need to give it two arguments that are:

Pin: The digital pin number on which the device is connected

Value: the value that is to be assigned to the pin either HIGH or LOW

DIGITALREAD

digitalRead Reads the value from a specified digital pin, either HIGH or LOW. It's syntax reads “ digitalRead(pin) ”.

DELAY

NOTES/FREQUENCIES

In this project and in the last project we have had to use the frequencies of different notes to put together a song. A frequency is what determines the pitch of a sound. A note is used to represent the pitch and duration of a sound in musical notation. From the notes that are found on pieces of sheet music they need to be converted to a certain frequency to match the original sound of the song. This can be solved with note frequency charts, showing the differentiation between octaves.

notes/c4eng/fall2022/projects/sss1.txt · Last modified: 2022/10/27 03:53 by ilaface