Show Posts
Pages: [1] 2 3 ... 12
1  Using Arduino / Programming Questions / Re: Class to help debug how long code takes on: May 11, 2011, 02:15:35 pm
Wow, haven't been here for a long time. Start browsing for a clue to figure out how long a function takes and crash right into this.

Thanks, really useful!
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Attempted LCD tutorial on: March 01, 2008, 03:26:14 pm
I didn't bother to search for it. But if I am right, in liquidcrystal.cpp you need to change the uint8_t into int. The info should be somewhere in the forum.
Ok, did the search for you:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1200450329;start=all
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1189780631
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Tut's on basic c for arduino? on: December 13, 2007, 04:31:22 pm
Quote
lets take for example the piezo tone maker, what the hell is that about?! i put it on my ardiuno program and tried to uplaod, but it had a bagillion syntax errors, am i missing something, why isint it just going to the arduino and working?

I haven't got an arduino next to my computer but it verify's just fine, no error at all. Did you notice there are 2 programs on the page? How does it look after an autoformat? Does it look alright? You might have missed the first character of the commentblock: /  Or the last } might be missing?

This is frustating,  I know, I had to learn too.
4  Forum 2005-2010 (read only) / Troubleshooting / Re: Tut's on basic c for arduino? on: December 13, 2007, 04:06:58 pm
But what is wrong with the tutorial page then?
Arduino is about hardware and software. So, an "hello world" for arduino is something like blinking 1 led. You take it from there. Yes, it is hard sometimes, but what it takes is practice. Improvise on the existing examples, try small changes.

Use the autoformat so your code stays somewhat readable. If something works and you want to try big changes, save the current file and start in a new copy. If things go wrong, you can always look up how it worked earlier.

But in the end, it just takes practice and time. And if you really can't figure it out, post your questions to the forum.
5  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino BT and the basics on: November 26, 2007, 04:36:39 pm
There is a topic about getting into command mode with the escape sequence. It also has some example code. I don't know the topic title but use google to search the forum. The  forum search doesn't always return all results.
6  Forum 2005-2010 (read only) / Troubleshooting / Re: call command doubts on: October 23, 2007, 05:58:39 am
Have you read the WT11 userguide? And have you read it again? And again?  smiley

For starters I would try to troubleshoot on a pc or mac, whichever you use, instead of a pocketpc. If the arduino BT is running you will be able to initiate a connection from the computer. Did you already pair the BT with your system? Oh, of course, otherwise you wouldn't be able to program.
What happens if you open the serial connection from the pocketpc to the arduino BT? If that doesn't work then it will not work the other way either.
Skip the CALL function for now, get it working manually first.

As I have said in another thread of yours, autoconnect does work. Unfortunately I can't find my code at the moment. My svn repository is a bit of mess and I am not sure if I have committed the code. I hope to find the code tonight, otherwise I'll have to figure it out again.
7  Forum 2005-2010 (read only) / Troubleshooting / Re: interruptions for arduino bluetooth on: August 23, 2007, 02:25:39 pm
I am not sure what you want exactly and if you need interrupts for that. But in the loop you can check if there are bytes in the serial buffer with Serial.available(). this returns the number of bytes in the buffer which you can read with Serial.read. If the buffer is empty, nothing happens, only loop is running.  If there is something in the buffer, you can call a function depending on the value that you read.
8  Forum 2005-2010 (read only) / Troubleshooting / Re: start and stop intervall - please help! on: July 04, 2007, 01:26:48 pm
If you are in the interval function you don't read the stop button. So, you can never stop the interval function. You can try to use interrupts, read about in the reference.
9  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Ideas for Arduino 0011 on: November 05, 2007, 02:19:06 pm
Why not use a Makefile and compile from textmate? Have you seen this topic?
10  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: analogsensor input don't work in ext alimentat on: September 26, 2007, 06:40:50 am
This is wrong:
digitalWritebyte0,HIGH);
but this shouldn't even compile.
I guess that you mean power supply with alimentation? Didn't you forget the jumper for the external power supply?
11  Forum 2005-2010 (read only) / Syntax & Programs / Re: Doesn't serial.available return buffer size? on: March 07, 2008, 07:01:31 am
Maybe you need a delay after the first serial.available? It could be that the buffer isn't completely filled when you get to the next serial.available.
12  Forum 2005-2010 (read only) / Syntax & Programs / Re: Help: serial portname on: November 04, 2007, 02:16:15 am
You can only open the port once. If you want to open it in processing, make sure the serial monitor is closed in the arduino IDE.
13  Forum 2005-2010 (read only) / Syntax & Programs / Re: Serial.read to display text on LCD on: October 17, 2007, 12:28:15 pm
The code wasn't really complicated but had already changed from what I expected. I have a function to put the cursor the the right line:
Code:
void GotoLine(int line)
{
    switch (line)
    {
        case 1:
            lcd.cursorTo(1,0);
            break;
        case 2:
            lcd.cursorTo(2,0);
            break;
        case 3:
            lcd.cursorTo(1,20);
            break;
        case 4:
            lcd.cursorTo(2,20);
            break;
    }
}
You don't need this but it makes things easier. I use it in this function:
Code:
switch(j)
    {
        case 0:
        line1("dev: ");
        line1(devStr);
        line1("temp: ");
        line1(tempStr);
        break;
    case 1:
        GotoLine(2);
        line1("dev: ");
        line1(devStr);
        line1("temp: ");
        line1(tempStr);
        break;
    case 2:
        GotoLine(3);
        line1("dev: ");
        line1(devStr);
        line1("temp: ");
        line1(tempStr);
        break;
    case 3:
        GotoLine(4);
        line1("dev: ");
        line1(devStr);
        line1("temp: ");
        line1(tempStr);
        delay(1000);
        lcd.clear();
        break;
    }
14  Forum 2005-2010 (read only) / Syntax & Programs / Re: Serial.read to display text on LCD on: October 17, 2007, 12:55:48 am
I need to look at my own code so this is only a wild guess. First, you can read something from the serial buffer and the characters that you don't read will stay in the buffer. If I am right the buffer is 128 bytes but you can change it (have to look that up too). Second, you can write 1 character to the display at a time. So, after 16 characters you jump to the second line. And don't forget to clear the display when you start at line 1 again.
In your code you start writing to line 2 if you have more than 16 characters, but you should display the first 16 on line 1 and then proceed on line 2.
Just for testing you can print a string of 40 characters to line 1 and check the display. It probably writes to the second line too. Otherwise leftshifting will show what is after the 16th character.
You might also want to catch a return, just in case you receive a sentence that is shorter than 16 characters.
Again, I have to look it up what I did exactly but I just made a line1, line2, line3 etc function to display something on a specific line.
15  Forum 2005-2010 (read only) / Syntax & Programs / Re: Serial.read to display text on LCD on: October 16, 2007, 02:36:06 am
You could read 8 characters from the serial buffer as a string and put it on the lcd with the println function. I don't know what display you have, but anything else as 1x8 characters behaves a bit strange. I have a 1x16 bit display which acts like 2x8 and 4x16 which counts lines top to bottom as 1, 3, 2, 4. I don't know if it is normal this way. But you need to do some coding to get it working aas you want.
Pages: [1] 2 3 ... 12