Connect the VCC and GND pins of the ultrasonic sensor to the 5V and GND pins of the Arduino board, respectively. Connect the TRIGGER pin of the ultrasonic sensor to digital pin 8 of the Arduino board.
This code helps to control a servo motor using a touch sensor. You can connect the wires as below. Connect the touch sensor pin to D2 Connect the servo motor pin to D9 //below is the arduino code ...
サーボモーターとは回転角を指定できるアクチュエータである。 ネットにあがっている情報を参考に手持ちのSG90をarduino UNO R3で制御してみた。 モーターの回転を4枚のギヤで落とし ポテンシオメーター(Bタイプ、5K?)で回転角を読んでいると思われる。
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する