I just got my TouchShield Slide a couple days ago, so I'm new to programming these shields. I can't seem to get the darn thing to do anything. After uploading the sketches onto my Arduino Uno and the TSS, I only see a white screen. I've tried numerous sketches from Liquidware and example sketches, but nothing seems to work. What does a white screen on the TSS mean??
Since you're new to the forum I guess I should point out that if you want to get your questions answered it helps to provide some
info. You should read this:
http://forum.arduino.cc/index.php/topic,148850.0.html but if you want to get the ball rolling you should provide:
- A link to where you purchased the shield.
- Any datasheets or links to them about the shield.
- The code you are running, either a file attachement or post it using the "#" code button to create a scrolling window so people
can scroll through the code. - A situation report (SITREP) on what (if anything ) you have tried thus far.
- If you don't have the link to the vendor then you need to post a photo of it.
- If it is already wired, then we need to know how you wired it (what to what)
- If you have nothing and have done nothing , you need to state that as well.
Thank you for pointing that out, my mistake.
I purchased the shield here: http://www.liquidware.com/shop/show/TSL/TouchShield+Slide+
The only documentation I can find on the shield is here: https://www.jameco.com/Jameco/Products/ProdDS/2127558.pdf
I am using an Arduino Uno for the project.
The code that I am using for the Arduino Uno is:
#######################
//
// Two-way Serial Communications
//
// TouchShield Slide <-> Arduino
//
// An open-souce Shadowlord Project
// www.IamShadowlord.com
//
/////////////////////////////////////////
// Code for Arduino //
/////////////////////////////////////////
#include <SoftwareSerial.h>
#define RX_PIN 3
#define TX_PIN 2
SoftwareSerial touchSerial = SoftwareSerial(RX_PIN, TX_PIN);
// Globals
long randNumber;
void setup() {
touchSerial.begin(9600);
}
void loop() {
randNumber = random(300);
if(touchSerial.available())
{
char c = (char)touchSerial.read();
if (c == 'A')
{
touchSerial.print(randNumber);
delay(100);
}
}
}
#########################
And the code I'm using for the Shield is:
#########################
//
// Two-way Serial Communications
//
// TouchShield Slide <-> Arduino
//
// An open-souce Shadowlord Project
// www.IamShadowlord.com
//
/////////////////////////////////////////
// Code for TouchShield Slide //
/////////////////////////////////////////
// Globals
unsigned int Xstore;
unsigned int Ystore;
// Prepare Screen and Serial
void setup()
{
background(0,0,0);
stroke(255,255,255);
fill(0,0,0);
Serial.begin(9600);
delay(100);
}
void loop()
{
// Monitor TouchShield Slide for touches
gettouch();
// Check if there are new touches
// If yes, send serial command to Arduino
if ( mouseX != Xstore || mouseY != Ystore )
{
Serial.print("A");
delay(50);
}
Xstore = mouseX;
Ystore = mouseY;
// Monitor Serial Buffer of TouchShield Slide
char charIn = 0;
byte i = 0;
char stringIn[32] = "";
while(Serial.available()) {
charIn = Serial.read();
stringIn = charIn;
- i += 1;*
- }*
- // Clear screen and display the serial buffer as text*
- if (stringIn[0])*
- {*
- background(0,0,0);*
- text(stringIn, mouseX+75, mouseY+75, 30, 30);*
- } *
}
##############################
Before uploading any sketches, I popped the shield on top of the arduino (I'm connecting it just fine).
Then the first thing I did was upload the arduino sketch in the arduino IDE 1.05, and then I uploaded the shield sketch in the antipasto -0044 IDE. Everything compiles just fine, but overall does nothing; the screen turns white, and that's it. So my question is is it most likely a software/code issue? I don't think that is the case, I think it's a hardware issue. What does a white screen mean?
or post it using the "#" code button to create a scrolling window so people
can scroll through the code.
Highlight the code , then click on the "#" CODE BUTTON.
Arduino Code:
//
// Two-way Serial Communications
//
// TouchShield Slide <-> Arduino
//
// An open-souce Shadowlord Project
// www.IamShadowlord.com
//
/////////////////////////////////////////
// Code for Arduino //
/////////////////////////////////////////
#include <SoftwareSerial.h>
#define RX_PIN 3
#define TX_PIN 2
SoftwareSerial touchSerial = SoftwareSerial(RX_PIN, TX_PIN);
// Globals
long randNumber;
void setup() {
touchSerial.begin(9600);
}
void loop() {
randNumber = random(300);
if(touchSerial.available())
{
char c = (char)touchSerial.read();
if (c == 'A')
{
touchSerial.print(randNumber);
delay(100);
}
}
}
Shield code:
//
// Two-way Serial Communications
//
// TouchShield Slide <-> Arduino
//
// An open-souce Shadowlord Project
// www.IamShadowlord.com
//
/////////////////////////////////////////
// Code for TouchShield Slide //
/////////////////////////////////////////
// Globals
unsigned int Xstore;
unsigned int Ystore;
// Prepare Screen and Serial
void setup()
{
background(0,0,0);
stroke(255,255,255);
fill(0,0,0);
Serial.begin(9600);
delay(100);
}
void loop()
{
// Monitor TouchShield Slide for touches
gettouch();
// Check if there are new touches
// If yes, send serial command to Arduino
if ( mouseX != Xstore || mouseY != Ystore )
{
Serial.print("A");
delay(50);
}
Xstore = mouseX;
Ystore = mouseY;
// Monitor Serial Buffer of TouchShield Slide
char charIn = 0;
byte i = 0;
char stringIn[32] = "";
while(Serial.available()) {
charIn = Serial.read();
stringIn[i] = charIn;
i += 1;
}
// Clear screen and display the serial buffer as text
if (stringIn[0])
{
background(0,0,0);
text(stringIn, mouseX+75, mouseY+75, 30, 30);
}
}