Skip to content

ecs-193/conveyor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Conveyor

To read the value of encoder, The Teensy 3.2 Micro-controller is used and following software are installed:

  1. Arduino Software: The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board
  2. Teensyduino Installer: Teensyduino is a software add-on for the Arduino software.

To program Teensy 3.2, a code called encoder.ino is written in C++ and stored in the repository. It is a simple code that makes encoder objects, setup serial communications, and read the value of encoder if it is available.

Encoder encoder(pin1, pin2) Create an Encoder object, using 2 pins. You may create multiple Encoder objects, where each uses its own 2 pins. The first pin should be capable of interrupts. If both pins have interrupt capability, both will be used for best performance. The encoder will also work in low-performance polling mode if neither pin has interrupts.

encoder.read() Returns the accumulated position. This number can be positive or negative. That is why the absolute value is used to always get the positive value.

enccoder.write(newPosition) Set the accumulated position to a new number. For more information see Teensy Encoder Library

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages