How to Wire a Pressure Sensor to Arduino: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
:*Connecting a button involves connecting one wire to 5V from one of the Arduino pins, and connecting the other wire to the Arduino pin that does the reading. We also need a resistor to ground - so that when the putton is not presssed, the pin is pulled down to 0.
:*Connecting a button involves connecting one wire to 5V from one of the Arduino pins, and connecting the other wire to the Arduino pin that does the reading. We also need a resistor to ground - so that when the putton is not presssed, the pin is pulled down to 0.
*Read about pin function as input or output on Arduino - [https://www.arduino.cc/en/Tutorial/DigitalPins]
*Read about pin function as input or output on Arduino - [https://www.arduino.cc/en/Tutorial/DigitalPins]
:*We can avoid external resistors because Arduino contains pullup resistors that can be activated in software
'''Summary:''' Save yourself the complexity of extra parts by avoiding extra resistors, because you can use ones that are inside the Arduino already. See Instructables - [https://www.instructables.com/id/Arduino-Button-with-no-resistor/]
=Pressure Trigger Switch=
*For the OSE CEB press, we use a switch that is simply an on-off function
*This can be read as in the above example.

Latest revision as of 03:59, 11 January 2019

  • First, see how to program a button - [1]
  • Connecting a button involves connecting one wire to 5V from one of the Arduino pins, and connecting the other wire to the Arduino pin that does the reading. We also need a resistor to ground - so that when the putton is not presssed, the pin is pulled down to 0.
  • Read about pin function as input or output on Arduino - [2]
  • We can avoid external resistors because Arduino contains pullup resistors that can be activated in software

Summary: Save yourself the complexity of extra parts by avoiding extra resistors, because you can use ones that are inside the Arduino already. See Instructables - [3]

Pressure Trigger Switch

  • For the OSE CEB press, we use a switch that is simply an on-off function
  • This can be read as in the above example.