Parallax 4-Directionele Kantel Sensor

ParallaxArtikelnummer:RB-Plx-237
Fabrikant #: 28036

Prijs  :
Verkoopprijs €12,09

Inclusief belasting

Verzending berekend bij het afrekenen

Voorraad  :

Binnenkort nieuwe voorraad Zie vervaldatum

Laat me weten wanneer dit product op voorraad is

Betalingen en veiligheid

Apple Pay Mastercard PayPal Visa

Uw betalingsgegevens worden veilig verwerkt. We slaan geen creditcardgegevens op en hebben ook geen toegang tot uw creditcardgegevens.

Description

  • Kleine 6-pins DIP-verpakking met broodbord vriendelijke 0.1'' pinafstand
  • Gemakkelijke communicatie met elke microcontroller
  • 2-pins hoge / lage uitgang voor vier sensor staten
  • Stroomvereisten: 3 tot 5,5 VDC
  • Bedrijfstemperatuurbereik: 0 tot 50 ° C (32 tot 122 ° F)
  • Afmetingen: 0.42 '' x 0.32 '' x 0.49 ''

PDF bestand

Customer Reviews

Based on 3 reviews
100%
(3)
0%
(0)
0%
(0)
0%
(0)
0%
(0)
J
Jean-Loup
Works very well

Here's a little program for Arduino Uno: // 2x16 Lcd Display #include "LiquidCrystal.h" // add the LCD library Liquid Crystal lcd (9,8,13,12,11,10); // link 4 bits of data // variables used for tilt detection int portout1 = 2; // the pin OUT1 of the cirest connected to the analog port A2 int portout2 = 3; // the OUT2 pin is connected to the A3 analog port int lectout1; int lectout2; int out1; int out2; void setup () { // Display    lcd.begin (16.2); // use a 16 columns and 2 lines screen    lcd.clear ();    lcd.home (); // line 1, column 0    lcd.write ("INITIALIZATION");    delay (1500); // serial link   Serial.begin (9600);                } void loop () // Loop {  out1 = 0;  out2 = 0;  // ****************************************** Sequence playback analog ports  lectout1 = analogRead (portout1); // read A2 port status  lectout2 = analogRead (portout2); // reading the status of the A3 port  // ****************************************** Sequence conversion analog state to state binary  if (lectout1> 500)    {      out1 = 1;    }  if (lectout2> 500)    {      out2 = 1;    }  // ****************************************** LCD orientation display sequence  if (out1 == 1)     {       if (out2 == 1)         {           lcd.clear ();           lcd.home (); // column 0, line 1           lcd.write ("HORIZONTAL OR");           lcd.setCursor (0, 1); // column 0, line 2           lcd.write ("PENCHE -> RIGHT");         }       else         {           lcd.clear ();           lcd.home (); // column 0, line 1           lcd.write ("DESCEND");           lcd.setCursor (0, 1); // column 0, line 2           lcd.write ("");         }     }   else       {       if (out2 == 1)         {           lcd.clear ();           lcd.home (); // column 0, line 1           lcd.write ("MONTE");           lcd.setCursor (0, 1); // column 0, line 2           lcd.write ("");         }       else         {           lcd.clear ();           lcd.home (); // column 0, line 1           lcd.write ("PENCHE -> LEFT");           lcd.setCursor (0, 1); // column 0, line 2           lcd.write ("");         }     }   delay (200); }

J
Jean-Loup
Fonctionne très bien

Voilà un petit programme pour Arduino Uno : // Affichage Lcd 2x16 #include "LiquidCrystal.h" //ajout de la librairie LCD LiquidCrystal lcd(9,8,13,12,11,10). //liaison 4 bits de données // les variables utilisées pour la détection inclinaison int portout1 = 2. // le pin OUT1 du cirest connecté au port analogique A2 int portout2 = 3. // le pin OUT2 est connecté au port analogique A3 int lectout1. int lectout2. int out1. int out2. void setup() { // Affichage lcd.begin(16,2). //utilisation d'un écran 16 colonnes et 2 lignes lcd.clear (). lcd.home (). // ligne 1, colonne 0 lcd.write("INITIALISATION "). delay(1500). // liaison série Serial.begin(9600). } void loop() // Boucle { out1 = 0. out2 = 0. //******************************************Séquence lecture ports analogiques lectout1 = analogRead(portout1). // lecture de l'état du port A2 lectout2 = analogRead(portout2). // lecture de l'état du port A3 //******************************************Séquence conversion état analogique en état binaire if (lectout1 > 500) { out1 = 1. } if (lectout2 > 500) { out2 = 1. } //******************************************Séquence affichage orientation sur LCD if (out1 == 1) { if (out2 == 1) { lcd.clear (). lcd.home (). // colonne 0, ligne 1 lcd.write("HORIZONTAL OU "). lcd.setCursor ( 0, 1 ). // colonne 0, ligne 2 lcd.write("PENCHE -> DROITE"). } else { lcd.clear (). lcd.home (). // colonne 0, ligne 1 lcd.write("DESCEND "). lcd.setCursor ( 0, 1 ). // colonne 0, ligne 2 lcd.write(" "). } } else { if (out2 == 1) { lcd.clear (). lcd.home (). // colonne 0, ligne 1 lcd.write("MONTE "). lcd.setCursor ( 0, 1 ). // colonne 0, ligne 2 lcd.write(" "). } else { lcd.clear (). lcd.home (). // colonne 0, ligne 1 lcd.write("PENCHE -> GAUCHE"). lcd.setCursor ( 0, 1 ). // colonne 0, ligne 2 lcd.write(" "). } } delay(200). }

J
Jean-Loup
Fonctionne très bien

Voilà un petit programme pour Arduino Uno : // Affichage Lcd 2x16 #include "LiquidCrystal.h" //ajout de la librairie LCD LiquidCrystal lcd(9,8,13,12,11,10); //liaison 4 bits de données // les variables utilisées pour la détection inclinaison int portout1 = 2; // le pin OUT1 du cirest connecté au port analogique A2 int portout2 = 3; // le pin OUT2 est connecté au port analogique A3 int lectout1; int lectout2; int out1; int out2; void setup() { // Affichage lcd.begin(16,2); //utilisation d'un écran 16 colonnes et 2 lignes lcd.clear (); lcd.home (); // ligne 1, colonne 0 lcd.write("INITIALISATION "); delay(1500); // liaison série Serial.begin(9600); } void loop() // Boucle { out1 = 0; out2 = 0; //******************************************Séquence lecture ports analogiques lectout1 = analogRead(portout1); // lecture de l'état du port A2 lectout2 = analogRead(portout2); // lecture de l'état du port A3 //******************************************Séquence conversion état analogique en état binaire if (lectout1 > 500) { out1 = 1; } if (lectout2 > 500) { out2 = 1; } //******************************************Séquence affichage orientation sur LCD if (out1 == 1) { if (out2 == 1) { lcd.clear (); lcd.home (); // colonne 0, ligne 1 lcd.write("HORIZONTAL OU "); lcd.setCursor ( 0, 1 ); // colonne 0, ligne 2 lcd.write("PENCHE -> DROITE"); } else { lcd.clear (); lcd.home (); // colonne 0, ligne 1 lcd.write("DESCEND "); lcd.setCursor ( 0, 1 ); // colonne 0, ligne 2 lcd.write(" "); } } else { if (out2 == 1) { lcd.clear (); lcd.home (); // colonne 0, ligne 1 lcd.write("MONTE "); lcd.setCursor ( 0, 1 ); // colonne 0, ligne 2 lcd.write(" "); } else { lcd.clear (); lcd.home (); // colonne 0, ligne 1 lcd.write("PENCHE -> GAUCHE"); lcd.setCursor ( 0, 1 ); // colonne 0, ligne 2 lcd.write(" "); } } delay(200); }

Verzending schatten:

Dit vind je misschien ook leuk