Wednesday, October 7, 2009

Week 5 - Using Arduino's Internal Pull-ups


Potential Divider (above)

Top - Pull-up resistor

Bottom - Pull-down resistor


Potential Divider: v2 = (r2/(r1+r2))*v1............where v1 is volatge in and v2 is voltage out


Pull-up resistor:

This is used in conjunction with an internal switch inside the Arduino. It pulls the voltage towards the 5V if no external connection is made.

Using variables in Arduino code:

Variables make our code more human readable. They are necessary for coding a value. More importantly, it is a way of naming and storing a value.

int - 16 bit integers
long - 32 bit integers
byte - 8 bit integers

Arduino Serial:
Serial data is data in the form of ascending bits or bits that are sent one after another. Bits are sent as 1s and 0s.
The Arduino is hard-wired to "talk" to its serial port. Mac OS and Windows also read from serial ports.
Software that read serial information from Arduino include:
  • Terminal
  • Zterm
  • Hyperterminal
  • Cornflake
  • Serial monitor on Arduino IDE
  • Pd
  • Max/MSP
Some firmware to send serial information:


I = current - amps (flow)
V=voltage - volts (pressure)
R=Resistance - ohms

V/I x R

Variable resistor/Parallel resistors

R1 x R2/R1 + R2= total ohms of resistor.

series R1+R2+R3 = total ohms of resistor.

No comments:

Post a Comment