Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Digital Pin 6 pullup resistor? on: July 07, 2007, 06:33:05 pm
Quote
paulb: OK I think I have confirmed it really is  in the bootloader.

So have you looked the code over? While you're looking at it, is there any way to have the bootloader know the download is done and skip looking for another download? Would be nice if after a download it would skip the download code and just start the program. Makes for a very long wait from download initiation to action.

Thanks for working on the pin 6 glow. Have been expimenting with my barebones board. Now that I have the TTL usb/serial cable it finally works.
Arvin
2  Forum 2005-2010 (read only) / Syntax & Programs / Re: Function ____ does not exist....but it does! on: December 11, 2008, 11:14:38 am
AAAArg! Arduino is the hardware Processing is on the pc! Damn....I' just getting senile!

I guess I'll go try over on the Processing forum!

Sorrrrrrrryyyyyy!
3  Forum 2005-2010 (read only) / Syntax & Programs / Function ____ does not exist....but it does! on: December 11, 2008, 11:03:24 am
I've worked on this far too long....need some help!

I've written a fairly long (~1300 lines of code in 8 files) program that just suddenly started to give me the "Function blah() does not exist". Actually did write one called blah!

Is there a limitation on code length and did I reach it?

I had this happen a year or so ago and I just renamed either the file or function and it worked again fine. This time I even tried to make new projects and added code in new folders with different names etc with no luck. Remming out the offending function just leads to the next as not existing!

 BUT... I actually added a folder and wrote a "void blah(int n)" with just a rem in it and the program ran fine! I have some more work to do to this program but I don't want to until I get this error taken care of!

Anybody have a clue what's going on?

edit: year ago I think I was on 0135 and now I just started 1.0.1
4  Forum 2005-2010 (read only) / Interfacing / Re: arduino & processing - 2 thermocouples mixed up on: September 13, 2009, 10:48:39 am
looking at you previous code...you are reading 2 bytes with:
tempC = commPort.read();
tempB = commPort.read();

so when it has two bytes it puts them in tempC and B but it one of the bytes got lost in space so Processing would reverse them.

I usually use
serialPort.bufferUntil(lf);
and
void serialEvent(Serial serialPort) {
  inString = (serialPort.readString());
}
where the inString is global. You could return the string or process it in the same procedure and use global temp variables/

in arduino
Serial.print(A,BYTE);
Serial.println(B,BYTE);
that will send two bytes and a linefeed which is being awaited by processing.
5  Forum 2005-2010 (read only) / Interfacing / PrintWriter on: November 27, 2007, 10:58:29 am
I used the code from : http://processing.org/learning/topics/savefile2.html to learn how to write a file to disk.

Unfortunately using the SpringGUI library I can't just press a key to save the data to disk. No problem, I thought, just put a button on the sketch and save from it.

Of course, that didn't work or I wouldn't be  writing this message.  [smiley=rolleyes.gif]

So anyone know why or how?

Arvin
6  Forum 2005-2010 (read only) / Troubleshooting / Re: Write to external eeprom on: August 26, 2009, 08:29:53 am
Your picture calls it a smart clock.....so it's a clock.
What do you store in the eeprom?
7  Forum 2005-2010 (read only) / Troubleshooting / Re: Write to external eeprom on: August 26, 2009, 08:24:03 am
Thanks for the reply...I'm using the mega1280 not the 328 and the eeprom is the AT24C1024BW not the 24LC256. The eeprom's datasheet says you can leave them floating. The datasheet for the 245LC256 says the same thing.

I'm afraid it's the wiring library. There's some comments in it that make me believe there's some difference.

If no further information is posted, I'll try grounding the pins. Hate soldering!
8  Forum 2005-2010 (read only) / Troubleshooting / Write to external eeprom on: August 25, 2009, 08:20:00 pm
I'm trying to use the playground's tutorial to write data to an external eeprom...an AT24C1024BW. I'm using a mega1280 with a bootloader on a non-arduino clone board.

The eeproms A1,A2,A3 were left floating as was the wp pin since the datasheet said that the internal pullups would pull them to ground.

I'm using 0x50 for the eeprom's address and sending the data from Processing....

If I leave out the call to saving bytes to the eeprom all goes well. When I send the data to the eeprom every thing stops. I've put a flash routine in the mega to show when bytes were written. It never flashes. I've put print statements in Processing to show the "ok"  sent back from the mega. It only gets one "ok" the one first sent by the mega to show it's ready to receive.

mega's (short) code:
Code:
#define BytesToWrite 16
byte pwmLevels[BytesToWrite];
int col, row;
unsigned int eepromPos=0;

void setup(){
  flash13(9,50);
  Serial.begin(19200);
  Serial.print("ok");//Processing waits to get the "ok"
}

void loop(){
  if (Serial.available() >= BytesToWrite){
    flash13(1,50);
    for (int i=0; i<BytesToWrite; i++){
      pwmLevels[i] = Serial.read();
      //pwmLevels[i] = c;
    }
    /*for (int i=0; i<BytesToWrite; i++){
      Serial.print(pwmLevels[i],DEC);
      Serial.print(" ");
    }**/
      // 0x50 is the eeprom's address if pins 1,2,3 are tied to ground or left floating.
    //i2c_eeprom_write_byte( 0x50, eepromPos, c );//one byte at a time
    i2c_eeprom_write_page( 0x50, eepromPos, pwmLevels, BytesToWrite );
    eepromPos += BytesToWrite;
//    delay(5);//allow eeprom to save buffered bytes
    flash13(1,50);
    Serial.print("ok");//"Processing" waits to get the "ok".

  }
}

void flash13(int howManyTimes, int delayTime){//flash the led on pin13
  for(int i=0;i<howManyTimes;i++){
    digitalWrite(13,HIGH);
    delay(delayTime);
    digitalWrite(13,LOW);
    delay(delayTime);
  }//show the world we got here
}
Processing's (also short) code:
Code:
import processing.serial.*;
// used to send the mega bits of data to the arduino mega

Serial serialPort;

byte[] ByteShades = new byte[131072];
int ndxVar=0;//+- 2,147,483,648
String inString = "";
int BytesToSend = 16;
int lf=10;
PFont myFont;

void setup() {
  size(500,200);
  myFont = loadFont("BitstreamVeraSans-Bold-18.vlw");
  textFont(myFont, 18);
  serialPort = new Serial(this, "/dev/ttyUSB1", 19200);//"/dev/ttyUSB2"
  //println("/dev/ttyUSB1");
  ByteShades = loadBytes("Shades.dat");
  serialPort.bufferUntil('k');
}

void draw() {
  background(0);

  if(inString.equals("ok")){
    println(inString);
    inString="";
    sendBytes();
  }
  text("Sent: " + ndxVar+" bytes", 10,50);
}

void sendBytes(){
  for(int j = 0; j < BytesToSend; j++){
    serialPort.write(ByteShades[ndxVar]);
    ndxVar++;
    //print(ByteShades[ndxVar]+" ");
  }
  println("");
}

void serialEvent(Serial p) {
  inString = (serialPort.readString());
}

Anyone like to see if they can make it work? I've tried for several days with no luck. I'm wondering if changes need to be made to the wiring library to make the mega1280 compatible. It could be the internal pulldowns aren't setting the correct address. I could bridge the pins to ground. Hate to, it looks nice right now!
9  Forum 2005-2010 (read only) / News / [m by=mellis destboard=programming dest=1229011404]: Function ____ does not exist....but it does! on: December 11, 2008, 11:14:38 am
[moved] [link=http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1229011404/0]Syntax & Programs[/link] [move by] mellis.
10  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: some questions! on: December 01, 2007, 01:40:25 pm
Quote
no please! not VB!!! i use linux, all the other programming language for an example can be good smiley-grin
i really don't know how arduino works, and i wish to know all it potential smiley-grin

I'm new to this forum but I have been using Processing to communicate successfully over the usb cable to my arduino for several months now.

Currently I am working on using 3 stepper motors to make a reprap. I send the number of steps for each stepper to take and the arduino's code moves the steppers at different speeds so they stop at the same time. If you want to try my code the blog is at http://ar5in.tumblr.com/ and the code is stored at http://www.freewebs.com/adub/ .

Arvin
11  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Breadboard Arduino on: October 31, 2007, 07:52:50 am
http://www.uchobby.com/index.php/2007/07/01/ardunio-breadboard/

He breadboarded it here. He used a usb to ttl cable from: http://www.moderndevice.com/ which is where he also got the chip with the bootloader pre programmed.
Pages: [1]