Asked — Edited

Buttons And Lcd With Ez-B

hi, i have 2 questions here hope you guys can give me the answers;)

question 1

Is it possible to add buttons to the ez-b what i mean is i am thinking of adding a serial UART lcd to the ez-b would it be possible to change values on that lcd with adding additional buttons to the ez-b and how do i do that

question 2 i posted this question before but i couldn't get a clear answer so here i am again i am new to lcd and lcd codes, could you give me and example text script for my lcd like i i want to write "hello world" how do i do that because i dont really know how to enter texts on ez script and it would be nice if you can tell me how to do tricks like moving "hello world" text to side to side or display diffrent informations

here is a link of the lcd i bought http://www.ebay.com/itm/Serial-UART-I2C-SPI-Adapter-White-Blue-1602-LCD-for-Arduino-PIC-AVR-/370662529906?pt=LH_DefaultDomain_0&hash=item564d355b72

hope i can get some answers now, cheers


ARC Pro

Upgrade to ARC Pro

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

United Kingdom
#1  
  1. Yes. You can use either Digital ports or ADC ports for "buttons". When a switch between VCC and Signal is closed the signal is set to high/true/1 (on digital) or 255 (on ADC). A script can be written to check this and perform an action when the condition is met.

See this Bumper Push Button Digital Switch post and this Using ADC For Switch Inputs post

  1. As replied in your other topic, once I receive my LCD I will post you some examples, until then I have no way to check them. Unless someone else has the same LCD they will be unable to help as the commands may be different. Be patient and the examples will come, the manual for the LCD looks to be pretty straight forward.
#2  

okay thanks for the answer i am waiting my order to arrive too i have another simple led question here it is a simple led has 2 wires 1+ and 1- i soldered red and black to a servo wire plugged it to d1 on the ez-b can you give me the script to turn it on and off for d1 port thank you

United Kingdom
#3  

Connect the led to black and white. Red is always live. Then use Set(d1,on) to turn it on and Set(d10,off) for off. Or add a Set Digital control.

Anything bigger than an LED use a TIP120/TIP122 Darlington switching circuit.

#4  

thanks rich i wont use anything bigger than a led but i might use led stripes in the future do i need to purchase TIP120/TIP122 Darlington switching circuit for led stripes

by the way you mean Set(d1,on) to turn it on and Set(d1,off) right? you wrote Set(d10,off)

United Kingdom
#5  

Sorry, yes (that was because I changed it from D0 but didn't look properly).

Anything that draws more than a few mW of power needs the switching circuit. They are cheap and easy to make.

#6  

how much does mW does one led draw

United Kingdom
#7  

It depends on the LED, you'll need to look at the datasheet. You will also need to calculate the resistor needed too based on the forward voltage, the EZB will feed 5v in to it, if it has a forward voltage of 2.1v then you need to reduce that. Google for a calculator and it'll work it out for you.

If in doubt build and use a TIP switching circuit. Basically LEDs are all that can be powered by the signal wire on the EZB.

#8  

your tutorial was really simple thank you

i will make TIP120/TIP122 Darlington switching circuit this weekend so what i see i will plug led(s) to the 2 pin pin header on the circuit and servo lead will go in the ez-b but this time there is 3 cable instead of 2 if i connect servo lead to d1 port on ez-b "Set(d1,on) to turn it on and Set(d1,off)" would stay the same to turn it on or off right? and with this circuit will i be able to use stripe leds and higher voltage leds too ?