Wheel Encoders for DFRobot 3PA and 4WD Rovers SKU:SEN0038
Part | Datasheet |
---|---|
![]() |
SEN0038 (pdf) |
PDF Datasheet Preview |
---|
Wheel Encoders for DFRobot 3PA and 4WD Rovers SKU:SEN0038 Contents • 1 Introduction Specification Sample Code • 2 Assembly Guide • 3 FAQ • 4 Encoder Schematics Introduction This encoders are designed for DFRobot 3PA and AWD Rovers. It can give you the rotation degree of the wheels. Encoder uses non-contact method to convert the angular displacement signals. Best fit with Micro DC Geared Motor. It includes encoders, plastic tube, paper-mediated gasket etc. Specification Voltage:+5V Current:<20mA Resolution:20 PPR Weight:20g Sample Code // # // # Editor // # Date Lauren from DFRobot : // # Product name Wheel Encoders for DFRobot 3PA and 4WD Rovers // # Product SKU SEN0038 // # Description // # The sketch for using the encoder on the DFRobot Mobile platform // # Connection for Uno or other 328-based: left wheel encoder -> Digital pin 2 right wheel encoder -> Digital pin 3 // # Note If your controller is not 328-based, please check ino.cc/en/Reference/AttachInterrupt for proper digital pins. #define LEFT 0 #define RIGHT 1 long coder[2] = int lastSpeed[2] = void Serial.begin 9600 int the data attachInterrupt LEFT, LwheelSpeed, CHANGE r the digital pin 2 attachInterrupt RIGHT, RwheelSpeed, CHANGE r the digital pin 3 //init the Serial port to pr //init the interrupt mode fo //init the interrupt mode fo void static unsigned long timer = 0; //print manager timer if millis - timer > Serial.print "Coder value " Serial.print coder[LEFT] Serial.print "[Left Wheel] " Serial.print coder[RIGHT] Serial.println "[Right Wheel]" ; lastSpeed[LEFT] = coder[LEFT] //record the latest speed value lastSpeed[RIGHT] = coder[RIGHT]; coder[LEFT] = 0; //clear the data buffer coder[RIGHT] = 0; timer = millis ; void LwheelSpeed coder[LEFT] ++ //count the left wheel encoder interrupts void RwheelSpeed coder[RIGHT] ++ //count the right wheel encoder interrupts Assembly Guide Step1: |
More datasheets: AB1804-T3 | ADDS-21XX-PC-1 | B39162B9416K610S 5 | 43-01118 | 96VG-256M-PE-MA | DPS120100UPS-P5P-SZ | 23-21UBC/C430/TR8 | 76000651 | FJNS4206RBU | FJNS4206RTA |
Notice: we do not provide any warranties that information, datasheets, application notes, circuit diagrams, or software stored on this website are up-to-date or error free. The archived SEN0038 Datasheet file may be downloaded here without warranties.