Grove starter kit


I have a grove starter kit and I am trying to get a reading from the tilt sensor and display it on the screen. I made a program, but when I turn the sensor the display filters threw what seems like all the possible symbols that it is capable of displaying. Obviously, the reading should only be numbers. Any help would be appreciated.

Drew Davis


My code…

#include <SerialLCD.h>
#if ARDUINO < 100
#include <NewSoftSerial.h>
#include <SoftwareSerial.h>
int sensorPin = A0;

SerialLCD slcd(11,12);

void setup() {



void loop() {

slcd.setCursor(0, 1);

void setup()

Maybe this is what you need to add? This sets the data rate so that you can communicate with your computer through the serial monitor.

According to the description on the link, the tilt switch should be read like a button (digital input). It says that when the switch is level, the button is open, and when it is tilted, the switch closes. Why are you including serial libraries? Get rid of them and try this: Just use the tilt switch as the button. Did you read this link provided on the main page of the link you provided? It walks you right through set up and a simple example project including the code.

You have started threads all over the place covering various subjects in a very short period of time. You will learn much more, be more successful, and be much much happier and satisfied in the long run if you do one thing at a time. In just a few days you have started threads and asked for help about this tilt sensor, motor drivers, ultrasonic sensors, servos, joysticks, serial lcd's, and photo resistors. This tilt sensor would be a good project to start with, but read and watch some arduino and electronics tutorials. I gave you a couple good links in another thread, or you can find some others. Start out slow and experiment.

When posting code, use the code tag tool. You can just highlight the code that you pasted and hit the '#' key much like you do when you post a link.

Good luck

Thank you!