Show Posts
Pages: 1 2 3 [4] 5 6 ... 239
46  Using Arduino / Programming Questions / Re: sending a word on: August 15, 2014, 11:05:41 am
edit:

The code didn't work at all.
47  Using Arduino / Project Guidance / Re: Controlling LED arrays - Not sure where to start on: August 15, 2014, 10:39:53 am
Take a look at this link.
https://learn.adafruit.com/rgb-led-strips/usage
48  Using Arduino / Programming Questions / Re: Pass const char [4][20] PROGMEM into function on: August 14, 2014, 09:53:06 pm
If you have the full code, please post it. Also what do you expect to be on the screen, can you provide an example?
49  Using Arduino / Project Guidance / Re: two-wheeled differential-drive robot rotation (one or two wheels) on: August 14, 2014, 01:46:27 pm
It's basically skid steering, which can be written and controlled easily. What do you plan on controlling it with?

Edit:
Quote
i'd like to use the robot to track a curve aided by a camera located at the ceiling of my room.
This might be a little more difficult and require more hardware and smarter software.
50  Using Arduino / Programming Questions / Re: Morse Code on: August 13, 2014, 11:25:17 pm
I just don't understand how the code will know it has reached the "start" bit. (Actually it wouldn't be a start bit, it would be an end bit, because you read a byte from LSB to MSB) 1 = dit, 0 = dah

But I'm too tired to argue about best methods or try to figure out this method, so I'm going to bed.

Good night all.

Edit: one more thing before I actually go.
If the code ignores the first bit, then how does it know when to stop and start a new letter?
51  Using Arduino / Programming Questions / Re: Morse Code on: August 13, 2014, 10:49:08 pm
That's why in my first example I had a value and the byte. The value would tell the code when to stop going through the byte. You can use a simple FOR loop and bitRead() to show the morse code patterns. 1 = dit and 0 = dah (or vice versa).

It's not that hard and it will work with numbers too.
52  Using Arduino / Programming Questions / Re: Morse Code on: August 13, 2014, 09:55:38 pm
Don't you also need to have a leading value to tell the code how many bits to cycle through? Because if you don't, how would you know which letter is being coded?

example:
byte tab[] = {
2, B01, // A
4, B1000,// B
4, B1010, // C
3, B100, //D
. . .
4, B1100 // Z
}
Now when a letter to be shown comes in, the code looks at the leading value and then cycles through the correct number of bits.

OR
you can make both into one byte and separate the byte into nibbles.(Actually better, and takes up less memory)
53  Using Arduino / Programming Questions / Re: TFT TouchScreen V1.0 seeedstudio !!!HELP ME!!! on: August 13, 2014, 08:41:03 pm
Here are the fixed (working) libraries. You must take all 3 out of the TFT_Old_libs folder and put them into the regular "libraries" folder, to work.

I changed 3 example sketches,
drawCircle_new
touchscreendemo
TouchScreenMenuTest

Look how they are written and follow them as examples.
54  Using Arduino / Programming Questions / Re: TFT TouchScreen V1.0 seeedstudio !!!HELP ME!!! on: August 13, 2014, 07:27:10 pm
I'll take a look when I get home, but I still need to know what lcd your using. A link to were you got it would be helpful.
55  Using Arduino / Programming Questions / Re: Morse Code on: August 13, 2014, 03:54:35 pm
What about this?
Code:
#define Ma dot(); dah();
#define Mb dah(); dot(); dot(); dot();
#define Mc dah(); dot(); dah(); dot();
#define Md dah(); dot(); dot();
#define Me dot();
#define Mf dot(); dot(); dah(); dot();
#define Mg dah(); dah(); dot();
#define Mh dot(); dot(); dot(); dot();
#define Mi dot(); dot();
#define Mj dot(); dah(); dah(); dah();
#define Mk dah(); dot(); dah();
#define Ml dot(); dah(); dot(); dot();
#define Mm dah(); dah();
#define Mn dah(); dot();
#define Mo dah(); dah(); dah();
#define Mp dot(); dah(); dah(); dot();
#define Mq dah(); dah(); dot(); dah();
#define Mr dot(); dah(); dot();
#define Ms dot(); dot(); dot();
#define Mt dah();
#define Mu dot(); dot(); dah();
#define Mv dot(); dot(); dot(); dah();
#define Mw dot(); dah(); dah();
#define Mx dah(); dot(); dot(); dah();
#define My dah(); dot(); dah(); dah();
#define Mz dah(); dah(); dot(); dot();

int led = 8;
byte data;

void setup() {
  Serial.begin(9600);
  pinMode(led, OUTPUT);
}

void loop() {
  while(Serial.available() > 0) {
    data = Serial.read();
    switch(data) {
    case 'a':
      Ma
        break;

    case 'b':
      Mb
        break;

    }
  }
}

void dot() {
  digitalWrite(led, HIGH);
  delay(300);
  digitalWrite(led, LOW);
  delay(300);
}

void dah() {
  digitalWrite(led, HIGH);
  delay(700);
  digitalWrite(led, LOW);
  delay(300);
}

I was wondering if it was possible to put "Ma, Mb, Mc..." into an array, but I don't think its possible.
56  Using Arduino / Project Guidance / Re: Bluetooth question on: August 13, 2014, 11:07:11 am
Any luck?

This sketch will not compile for you because you most likely don't have the libraries, especially my TFT_Extension library, but it has the part your looking to do.

Code:
#include <ITDB02_Graph16.h>
#include <ITDB02_Touch.h>
#include <TFT_Extension_old.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];

//myGLCD(RS,WR,CS,RST,ALE,mode);
ITDB02 myGLCD(A1,A2,A0,A3,A5,ITDB32S);
//myTouch(TCLK,TCS,DIN,DOUT,IRQ);
ITDB02_Touch  myTouch(13,10,11,12,A4);
TFT_Extension_old myTFT(&myGLCD, &myTouch, LANDSCAPE);

int XC,YC;
boolean state;
long time = millis();
void setup()
{
  myGLCD.InitLCD(LANDSCAPE);
  myGLCD.clrScr();
  myGLCD.setFont(SmallFont);
  myTouch.InitTouch(LANDSCAPE);
  myTouch.setPrecision(PREC_EXTREME);
  myGLCD.fillScr(0,0,0);
  pinMode(37, INPUT);
}

void loop()

  state = digitalRead(37);
  if(state)
  {
    long tmp = millis() - time ;
    myGLCD.printNumI(tmp,120,0);

    if(tmp > 1500) // 1500ms is more than enough time, but I was simulating the BT connection by hand.
      myGLCD.print("    connected", 0,0);
  }
  else
  {
    time = millis();
    myGLCD.print("Not connected",0,0);
  }
}
57  Using Arduino / Programming Questions / Re: TFT TouchScreen V1.0 seeedstudio !!!HELP ME!!! on: August 13, 2014, 10:54:34 am
Oh, the file you attached is made to output to the serial monitor, what have you done to make it work on your TFT screen?

I would suggest you make your screens into functions that you call from the menu system and in each functions have a GUI with the buttons you want. What libraries are you using for your TFT screen?
58  Using Arduino / Programming Questions / Re: TFT TouchScreen V1.0 seeedstudio !!!HELP ME!!! on: August 13, 2014, 10:02:20 am
I need to see what you have.
59  Using Arduino / Project Guidance / Re: RC car project on: August 12, 2014, 08:43:22 pm
There are SO many posts on controlling a robot with a single joystick and either be wired or wireless.

Do a search in the forum.
60  Using Arduino / Project Guidance / Re: RC car project on: August 12, 2014, 08:14:24 pm
Oh I thought you were talking about my little Lego robot being controlled by the PS2 controller, because that video, I don't have.
But my big truck with the camera (which I think you have seen before) is controlled by a 315 MHz RF module pair.

I'll post the links if needed.

I just upgraded the TFT touch screen controller to work with a Wii classic controller which in turn can control the truck too.
Pages: 1 2 3 [4] 5 6 ... 239