Show Posts
Pages: [1] 2 3 ... 8
1  Using Arduino / Programming Questions / Re: SOLVED invalid conversion from 'int' to 'const char' on: June 03, 2014, 04:30:05 pm
Thank you AWOL that fixed it smiley
2  Using Arduino / Programming Questions / Re: invalid conversion from 'int' to 'const char' on: June 03, 2014, 03:59:31 pm
I followed the instructions and This gets an error "Arduino: 1.5.6-r2 (Windows smiley-cool, Board: "Arduino Esplora"

google_glass.ino: In function 'void setup()':
google_glass:52: error: no matching function for call to 'TFT::text(String&, int, int)'
C:\Arduino\libraries\TFT\src/utility/Adafruit_GFX.h:174: note: candidates are: void Adafruit_GFX::text(const char*, int16_t, int16_t)

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences."

Code:
#define cs   10
#define dc   9
#define rst  8
#include <TFT.h>           
#include <SPI.h>
TFT TFTscreen = TFT(cs, dc, rst);
char sensorPrintout[4];
int lightsensor = A1;
const int buttonone = 2;
const int buttontwo = 3;
const int buttonthree = 5;
int buttonos = 0;
int buttonts = 0;
int buttontrs = 0;

int light = 0;
void setup() {
  pinMode(buttonone, INPUT);
  pinMode(buttontwo, INPUT);
  pinMode(buttonthree, INPUT);
  Serial.begin(9600);
  TFTscreen.begin();
  TFTscreen.background(0 , 129 , 255);
  TFTscreen.stroke(254 , 254 , 0);
  TFTscreen.setTextSize(2);
  TFTscreen.text("Hi I am \n ", 0, 0);
  TFTscreen.text("GLASS\n ", 0, 16);
  TFTscreen.setTextSize(1);
  TFTscreen.stroke(0 , 0 , 0);
  TFTscreen.text("Weather:\n ", 10, 65);
  light = analogRead(lightsensor);
  if (light > 1000) {
  TFTscreen.fill(254 , 254 , 0);
  TFTscreen.circle(TFTscreen.width()/5.5,TFTscreen.height()/1.5, 10);
  delay(500);
  }
  else {
  TFTscreen.stroke(0 , 0 , 148);
  TFTscreen.line(37, 95, 37, 77);
  TFTscreen.line(20, 96, 20, 79);
  TFTscreen.line(10, 92, 10, 74);
  TFTscreen.line(25, 96, 25, 78);
  TFTscreen.line(32, 86, 32, 70);
  }
  String sensorVal = String(analogRead(A0));
  sensorVal.toCharArray(sensorPrintout, 4);
  TFTscreen.stroke(0 , 0 , 0);
  TFTscreen.setTextSize(1);
  TFTscreen.text("Tempature:\n ", 10, 40);
  TFTscreen.setTextSize(2);
  TFTscreen.text(sensorVal, 10, 50);
}
3  Using Arduino / Programming Questions / invalid conversion from 'int' to 'const char' on: June 03, 2014, 03:25:45 pm
So I am still programming google glass but I am switching everything to arduino uno instead of using the esplora built in librarys.
And I get the normal "invalid conversion from 'int' to 'const char' "
Heres my code:
Code:
#define cs   10
#define dc   9
#define rst  8
#include <TFT.h>           
#include <SPI.h>
TFT TFTscreen = TFT(cs, dc, rst);
int tempsensor = A0;
int lightsensor = A1;
const int buttonone = 2;
const int buttontwo = 3;
const int buttonthree = 5;
int buttonos = 0;
int buttonts = 0;
int buttontrs = 0;
int temp = 0;
int light = 0;
void setup() {
  pinMode(buttonone, INPUT);
  pinMode(buttontwo, INPUT);
  pinMode(buttonthree, INPUT);
  Serial.begin(9600);
  TFTscreen.begin();
  TFTscreen.background(0 , 129 , 255);
  TFTscreen.stroke(254 , 254 , 0);
  TFTscreen.setTextSize(2);
  TFTscreen.text("Hi I am \n ", 0, 0);
  TFTscreen.text("GLASS\n ", 0, 16);
  TFTscreen.setTextSize(1);
  TFTscreen.stroke(0 , 0 , 0);
  TFTscreen.text("Weather:\n ", 10, 65);
  light = analogRead(lightsensor);
  if (light > 1000) {
  TFTscreen.fill(254 , 254 , 0);
  TFTscreen.circle(TFTscreen.width()/5.5,TFTscreen.height()/1.5, 10);
  delay(500);
  }
  else {
  TFTscreen.stroke(0 , 0 , 148);
  TFTscreen.line(37, 95, 37, 77);
  TFTscreen.line(20, 96, 20, 79);
  TFTscreen.line(10, 92, 10, 74);
  TFTscreen.line(25, 96, 25, 78);
  TFTscreen.line(32, 86, 32, 70);
  }
  temp = analogRead(tempsensor);
  TFTscreen.stroke(0 , 0 , 0);
  TFTscreen.setTextSize(1);
  TFTscreen.text("Tempature:\n ", 10, 40);
  TFTscreen.setTextSize(2);
  TFTscreen.text(temp, 10, 50);
}

void loop() {
  buttonos = digitalRead(buttonone);
  buttonts = digitalRead(buttontwo);
  buttontrs = digitalRead(buttonthree);
  TFTscreen.stroke(254 , 0 , 0);
  TFTscreen.line(84, 15, 84, 128);
  TFTscreen.setTextSize(1);
  delay(500);
  //VOICEEEEEEEE????????????///////?/////////////////////////////??????????????????????////////////
  TFTscreen.text("Ask me\n ", 95, 5);
  TFTscreen.text("anything\n ", 95, 12);
  if (buttonos == HIGH) {
    //HIGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH                  directions   
   TFTscreen.text("Directions\n", 90, 20);
   TFTscreen.stroke(0 , 0 , 0);
   TFTscreen.line(95, 30, 95, 128);
   TFTscreen.text("Lake\n", 97, 50);
   TFTscreen.text("Shore\n", 97, 56);
   TFTscreen.line(95, 35, 160, 35);
   TFTscreen.text("Parkland\n", 100, 37);
   TFTscreen.line(95, 70, 150, 70);
   TFTscreen.text("Porcupine\n", 98, 74);
   TFTscreen.line(150, 70, 158, 35);
   TFTscreen.line(95, 90, 158, 90);
   TFTscreen.line(158, 90, 150, 70);
   TFTscreen.text("Bexhill\n", 97, 93);
   TFTscreen.line(95, 105, 160, 105);
   TFTscreen.text("Medowood\n", 97, 108);
   TFTscreen.stroke(0 , 254 , 0);
   TFTscreen.line(140, 91, 140, 105);
   TFTscreen.line(141, 91, 141, 105);
   TFTscreen.line(142, 91, 142, 105);
   TFTscreen.line(143, 91, 143, 105);
   TFTscreen.line(144, 91, 144, 105);
   TFTscreen.line(145, 91, 145, 105);
   TFTscreen.line(146, 91, 146, 105);
   TFTscreen.stroke(0 , 129 , 255);
   delay(5000);
   TFTscreen.text("Directions\n", 90, 20);
   TFTscreen.stroke(0 , 129 , 255);
   TFTscreen.line(95, 30, 95, 128);
   TFTscreen.text("Lake\n", 97, 50);
   TFTscreen.text("Shore\n", 97, 56);
   TFTscreen.line(95, 35, 160, 35);
   TFTscreen.text("Parkland\n", 100, 37);
   TFTscreen.line(95, 70, 150, 70);
   TFTscreen.text("Porcupine\n", 98, 74);
   TFTscreen.line(150, 70, 158, 35);
   TFTscreen.line(95, 90, 158, 90);
   TFTscreen.line(158, 90, 150, 70);
   TFTscreen.text("Bexhill\n", 97, 93);
   TFTscreen.line(95, 105, 160, 105);
   TFTscreen.text("Medowood\n", 97, 108);
   TFTscreen.stroke(0 , 129 , 255);
   TFTscreen.line(140, 91, 140, 105);
   TFTscreen.line(141, 91, 141, 105);
   TFTscreen.line(142, 91, 142, 105);
   TFTscreen.line(143, 91, 143, 105);
   TFTscreen.line(144, 91, 144, 105);
   TFTscreen.line(145, 91, 145, 105);
   TFTscreen.line(146, 91, 146, 105);
   
  }
  if (buttonts == HIGH)//medddddddddddddddddddd
  {
    TFTscreen.fill(255 , 255 , 255);
    TFTscreen.stroke(0 , 255 , 0);
    TFTscreen.text("Shops\n", 97, 20);
    TFTscreen.stroke(0 , 0 , 0);
    TFTscreen.text("and\n", 128, 20);
    TFTscreen.stroke(0 , 0 , 255);
    TFTscreen.text("restaurant \n", 97, 28);
    TFTscreen.stroke(0 , 0 , 0);
    TFTscreen.line(120, 38, 120, 128);
    TFTscreen.line(90, 90, 160, 90);
    TFTscreen.stroke(0 , 255 , 0);
    TFTscreen.circle(140, 115, 8);
    TFTscreen.stroke(0 , 0 , 255);
    TFTscreen.circle(100, 60, 8);
    TFTscreen.stroke(0 , 255 , 0);
    TFTscreen.circle(95, 80, 8);
    delay(5000);
    TFTscreen.fill(0 , 129 , 255);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.text("Shops\n", 97, 20);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.text("and\n", 128, 20);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.text("restaurant \n", 97, 28);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.line(120, 38, 120, 128);
    TFTscreen.line(90, 90, 160, 90);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.circle(140, 115, 8);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.circle(100, 60, 8);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.circle(95, 80, 8);
  }
  if (buttontrs == HIGH) {
    TFTscreen.text("swimming:\n", 86, 30);
    TFTscreen.text("monday\n", 86, 37);
    TFTscreen.text("4:30-6:30\n", 86, 45);
    TFTscreen.text("tuesday\n", 86, 53);
    TFTscreen.text("6:00-7:30\n", 86, 61);
    TFTscreen.text("thursday\n", 86, 69);
    TFTscreen.text("4:30-6:30\n", 86, 77);
    TFTscreen.text("sunday\n", 86, 85);
    TFTscreen.text("11:00-1:00\n", 86, 93);
    delay(5000);
    TFTscreen.stroke(0 , 129 , 255);
    TFTscreen.text("swimming:\n", 86, 30);
    TFTscreen.text("monday\n", 86, 37);
    TFTscreen.text("4:30-6:30\n", 86, 45);
    TFTscreen.text("tuesday\n", 86, 53);
    TFTscreen.text("6:00-7:30\n", 86, 61);
    TFTscreen.text("thursday\n", 86, 69);
    TFTscreen.text("4:30-6:30\n", 86, 77);
    TFTscreen.text("sunday\n", 86, 85);
    TFTscreen.text("11:00-1:00\n", 86, 93);
    } 
  }
Thank you!
4  Using Arduino / Installation & Troubleshooting / Re: Uspeech library won't upload. on: May 10, 2014, 07:47:08 pm
For anybody else that has the same issue i fixed it by literally by renaming it and taking out the dashes and uppercase character, I am now going to test this library and thanks to anyone that tried to help! smiley-razz smiley
5  Using Arduino / Installation & Troubleshooting / Re: Uspeech library won't upload. on: May 10, 2014, 06:39:13 pm
Sorry i dont think the error is in that code I sent heres a screenshot:
6  Using Arduino / Installation & Troubleshooting / Uspeech library won't upload. on: May 10, 2014, 06:34:10 pm
Hello I am working on a Google glass approach that will include voice commands, I found a great arduino voice command library called U Speech, apparently it works great! But heres the problem, I downloaded the .zip file which includes the other README files and such and the .H and .CPP, I downloaded it, it goes to a winrar .zip file, then when i go into arduino to upload the library which I do alot, it says this:
Code:
Arduino: 1.5.6-r2 (Windows 8), Board: "Arduino Esplora"

Sketch uses 16,414 bytes (57%) of program storage space. Maximum is 28,672 bytes.

Global variables use 354 bytes (13%) of dynamic memory, leaving 2,206 bytes for local variables. Maximum is 2,560 bytes.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
I have no idea what that means but I need help to fix it.
Thanks in advance,
-Clay
7  Using Arduino / Displays / Re: Arduino tft screen just shows lines. on: April 08, 2014, 04:10:10 pm
thanks! cant wait to try it out
8  Using Arduino / Displays / Arduino tft screen just shows lines. on: April 07, 2014, 07:17:02 pm
I have an arduino esplora with the natraul screen, the screen is the new one for the robot, acouple people said they had the same problems. so when it turns on the screen goes all white, and after a few seconds it shows four black lines horizontally down the screen that block out, pong, or any other program. it also seems the screen is broken, at the top its loose (it can move up and down) other than that the hardware looks fine. some other people were saying its a sw problem and it works fine on the arduino robot only. Help! and thanks in advance!
9  Using Arduino / Displays / Re: Can't get my LCD screen to work. Help? on: April 07, 2014, 07:12:11 pm
Just putting it out there nice name smiley-wink but try connecting the second half of the control pins, like my hitachi has 8 control pins looks like you only have four. in some lcds the other four is the other half of the screen. good luck
10  Using Arduino / Programming Questions / Re: Mintrontics Mintduino chip won't program on: October 26, 2013, 11:14:46 am
 smiley Guys I had the same problem, easy fix- take two wires and plug them into rx and tx on arduino, then upload the sketch, or program the arduino chip and use it temporarily in your project. Remember be very careful putting it back into your arduino board.
-Clay
 
11  Using Arduino / General Electronics / Re: making a potentiometer with paper? on: April 07, 2013, 08:48:36 am
 Yes try making paper bigger thus causing less resistance but it is easier just to buy a potentiometer if your trying to complete a project good luck and tell us how you did it in the end! smiley
12  Using Arduino / General Electronics / Re: lm12864lfw to arduino on: April 06, 2013, 10:46:10 am
http://www.topwaydisplay.com/Pub/Manual/LM12864LFW-Manual-Rev0.1.pdf
13  Using Arduino / General Electronics / Re: lm12864lfw to arduino on: April 06, 2013, 08:49:48 am
scroll down to LM12864LFW and open second PDF
http://www.topwaydisplay.com/Product/LCDM-Graphics/index-gb.htm
14  Using Arduino / General Electronics / lm12864lfw to arduino on: April 05, 2013, 08:57:45 pm
Hello I want to run the GLCD library with my arduino and lm12864lfw I have tried different hookups to replace the ones in the library but I have failed. I need to know how to hookup the LCD to my arduino so I can use the GLCD library. Thanks!
15  Using Arduino / Programming Questions / Re: Arduino limit switch robot problem on: March 16, 2013, 05:17:44 pm
Thanks jimbo, but now when it hits something it stops and the loop repeats here new code:
Code:
int STBY = 10; //standby

//Motor A
int PWMA = 3; //Speed control
int AIN1 = 9; //Direction
int AIN2 = 8; //Direction

//Motor B
int PWMB = 5; //Speed control
int BIN1 = 11; //Direction
int BIN2 = 12; //Direction


const int button = 2;

int buttonState = 0;


void setup(){
  pinMode(STBY, OUTPUT);

  pinMode(PWMA, OUTPUT);
  pinMode(AIN1, OUTPUT);
  pinMode(AIN2, OUTPUT);

  pinMode(PWMB, OUTPUT);
  pinMode(BIN1, OUTPUT);
  pinMode(BIN2, OUTPUT);
 
  pinMode(button, INPUT);
 
}

void loop(){
 

 
buttonState = digitalRead(button);

  if (buttonState == LOW)
  {
     move(1, 255, 1); //motor 1, full speed, left
     move(2, 255, 2); //motor 2, full speed, right
     delay(10);     
  }
  else
  {
    move(1, 255, 2);
    move(2, 255, 1);
    delay(500);
    stop();
    move(1, 255, 1); //motor 1, full speed, left
    move(2, 255, 1); //motor 2, full speed, left
    delay(1000);
    stop();
  }
   
   
  }




void move(int motor, int speed, int direction){

//Move specific motor at speed and direction
//motor: 0 for B 1 for A
//speed: 0 is off, and 255 is full speed
//direction: 0 clockwise, 1 counter-clockwise

  digitalWrite(STBY, HIGH); //disable standby

  boolean inPin1 = LOW;
  boolean inPin2 = HIGH;

  if(direction == 1){
    inPin1 = HIGH;
    inPin2 = LOW;
  }

  if(motor == 1){
    digitalWrite(AIN1, inPin1);
    digitalWrite(AIN2, inPin2);
    analogWrite(PWMA, speed);
  }else{
    digitalWrite(BIN1, inPin1);
    digitalWrite(BIN2, inPin2);
    analogWrite(PWMB, speed);
  }
}

void stop(){
//enable standby 
  digitalWrite(STBY, LOW);
}
Pages: [1] 2 3 ... 8