1 / 14

Introduction to Inputs

Introduction to Inputs. By Mike He, Anindya Basu and Christopher Lin. PWM’s. Voltage. Signal. Ground. Inputs are carried through a 3-wire called a PWM (Pulse width modulator) cable to the Robot Controller. Connectors. Crimps.

alva
Download Presentation

Introduction to Inputs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Inputs By Mike He, Anindya Basu and Christopher Lin

  2. PWM’s Voltage Signal Ground • Inputs are carried through a 3-wire called a PWM (Pulse width modulator) cable to the Robot Controller Connectors Crimps

  3. Wires come in different colors, but you should be able to tell what they mean. • Red normally voltage • Yellow or white normally Signal • Ground normally black • Two kinds, male and female (a.k.a. with pin and without) • Color coding important, easier to troubleshoot if there is a problem

  4. Analog Signal vs. Digital Signal • Analog is from 0 to 255 • Value differs depending on the voltage sent, often from 0 to 5 volts. • Analog Signal is used for motors and some sensors. • Digital is from 0 to 1, and the voltage differs from HIGH to LOW. • Digital signal can be used for simple sensors, such as limit switches, or more complicated sensors using extremely fast pulses

  5. Digital Signal and Binary • Digital signal pulses REALLY FAST • Pulses converted to 0 and 1 • Sequence of pulses then converted to a number • Ex: 0001 is 1, 0010 is 2 etc. • RC treats a specific number of pulses as one set of inputs

  6. IFI Robot Controller • Old RC • Received inputs through digital and analog slots • Programmable using C.

  7. NI Compact RIO • New Robot Controller • Modular system • Programmable using C, C++, or Labview (graphical) • Beefier!

  8. AND NOW INTRODUCING (Sorta)...

  9. __ _____

  10. Vex and Easy C • You’ll be programming this in EasyC and later, many you have already programmed the vex • Easy C graphical programming environment • Easier for people without prior programming experience to program

  11. Some sensors you will be using on the VEX • Bumper/Limit Switch • Both digital signals, alert you when they is pressed. • Useful for detecting when a object strikes the sensor • Ex: stop the motors after an elevator hits full bottom

  12. Debugging • If there is a problem, it is probably YOUR fault, not the RC or the computer or mine(maybe…) • Good programming practices very important, hieroglyphics vs english • Easy understandability helps debugging • Bad code may be interesting, but it is hard to figure out • Follow logic of the code

  13. Debugging (continued) • Print out values to get a sense of what the program is doing • You might get unexpected results, figure out why it occurs • Make sure everything is doing what you want it to do, no loopholes • Comment things, so others may help you debug and understand your code faster

  14. Saving Code • A few things to remember: • Easy to recognize/read and in a accessible location, normally this is under the R file (we’ll show you later) • Safe often, and don’t save on the same file (save as, not save).

More Related