IR sensor, Motor speed sensor, Alarm, Temperature sensor, Pressure sensor, Level sensor, LCD display, GSM modem. Fig 3 shows the block diagram of CAN vehicle control system. It consists of one master node and two slave nodes.ARM as the master controller (Engine Control Module) which controls the vehicle status with various sensors. An LCD TV screen uses the sunglasses trick to switch its colored pixels on or off. At the back of the screen, there's a large bright light that shines out toward the viewer. In front of this, there are the millions of pixels, each one made up of smaller areas called sub-pixels that are colored red, blue, or green.
The parallel interface consists of the following pins:. Power Supply pins (Vss/Vcc): Power the LCD. Contrast pin (Vo): Control the display contrast. Register Select (RS) pin: Controls where in the LCD's memory you're writing data to. Read/Write (R/W): Selects reading mode or writing mode.
Enable pin: Enables writing to the registers. 8 data pins (D0 -D7): The states of these pins (high or low) are the bits that you're writing to a register when you write, or the values you're reading when you read.
Backlight (Bklt+ and BKlt-) pins: Turn on/off the LED backlightThe Hitachi-compatible LCDs can be controlled in two modes: 4-bit or 8-bit. The 4-bit mode requires seven I/O pins from the Arduino, while the 8-bit mode requires 11 pins.For displaying text on the screen, you can do most everything in 4-bit mode, so in this tutorial we will use 4-bit mode. Here's the code, embedded using codebender!The lcd.begin(16,2) command set up the LCD number of columns and rows. For example, if you have an LCD with 20 columns and 4 rows (20x4) you will have to change this to lcd.begin(20x4).The lcd.print('-message-') command print a message to first column and row of lcd display.
The 'message' must have maximum length equal to lcd columns number. For example, for 16 columns display max length is equal with 16 and for 20 columns display max length is equal with 20.The lcd.setCursor(0,1) command will set cursor to first column of second row. If you have an LCD 20x4 and you want to print a message to column five and third row you have to use: lcd.setCursor(4,2).Try downloading the codebender plugin and clicking on the Run on Arduino button to program your Arduino with this sketch. And that's it, you've programmed your Arduino board!You can keep playing with that by clicking the 'Edit' button and start making your own modifications to the code. For example, try to change message on first and second row.