Show Posts
Pages: [1] 2 3
1  Products / Arduino Due / Re: Xbee, Arduino Due and wireless Sketch Upload on: May 16, 2013, 09:34:10 am
I don't know, but I would love this capability.  I gave up on wireless programming since the FIO firmware apparently does not support the XBEE in API mode...
2  Products / Arduino Due / Re: Due and Xbee on: April 08, 2013, 11:52:45 am
http://code.google.com/p/xbee-arduino/

Yes, I got DUE to talk both ways w/ my old ATmega328p using series 1 radios and this library.  No special changes needed.  I don't use softserial, i connect using the hard serial lines.

I connected xbee pin 1 (i think), to 3.3V, pin 10, to gnd, pin 2 to rx, pin 3 to tx... The pin numbers may be wrong, but from the top left that's what they were.  Dout I know goes to RX and Din goes to TX to get two way comms.  No logic converters needed for DUE like w/ my arduino 5v stuff.
3  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: April 05, 2013, 07:03:30 pm
thanks, I'll install those tools to see how user friendly they are to non engineers that may be using my devices.
4  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: April 05, 2013, 01:21:32 pm
Hmm, I'm looking to build a barebones board like yours, but from goldphoenix PCB using EAGLEcad and will want to find a way to upload hex files via the native USB port.  So it sounds like I can do that but not sure about the user interface yet.

I need a very simple way for a third party to update via a hex file though, possible w/ the DUE?
5  Products / Arduino Due / Re: print from flash memory broken on DUE? on: April 04, 2013, 02:11:44 pm
I just used the RAM(); function in my main loop to print the FREE ram to screen, I did not change anything else, copy paste was it.  I think that came from the WaveHC library files.
6  Products / Arduino Due / DUE audio library interupt driven? on: April 04, 2013, 01:06:58 pm
I tested the Audio library on the DUE last night using my micro SD card reader and a 3 watt amplifier from sparkfun.  There was a lot of static on the amplifier (unsure if it's software or hardware yet).  It does work technically, but are you able to go off and do other code while the file plays?   

The waveHC library allowed me to go do other code and still have some interupts while the file played in the background.  Any idea how this one works and if there are other libraries in the works?

Code:
void loop()
{
  int count=0;

  // open wave file from sdcard
  File myFile = SD.open("test.wav");
  if (!myFile) {
    // if the file didn't open, print an error and stop
    Serial.println("error opening test.wav");
    while (true);
  }

  const int S=1024; // Number of samples to read in block
  short buffer[S];

  Serial.print("Playing");
  // until the file is not finished
  while (myFile.available()) {
    // read from the file into buffer
    myFile.read(buffer, sizeof(buffer));

    // Prepare samples
    int volume = 1024;
    Audio.prepare(buffer, S, volume);
    // Feed samples to audio
    Audio.write(buffer, S);

    // Every 100 block print a '.'
    count++;
    if (count == 100) {
      Serial.print(".");
      count = 0;
    }
  }
  myFile.close();

  Serial.println("End of file. Thank you for listening!");
  while (true) ;
}
7  Products / Arduino Due / Re: print from flash memory broken on DUE? on: April 04, 2013, 12:36:50 pm
Are you sure

Serial.print("FAIL");

Uses RAM on the Due. I would have thought on the ARM architecture constants are kept in flash anyway and the P macro is redundant.

_____
Rob

I'm pretty sure, unless they changed it in the last few versions.  My game has a lot of text and the RAM function I run will show FREE RAM go up alot when converting to flash memory storage.

Code:
int freeRam(void)
{
  extern int  __bss_end;
  extern int  *__brkval;
  int free_memory;
  if((int)__brkval == 0) {
    free_memory = ((int)&free_memory) - ((int)&__bss_end);
  }
  else {
    free_memory = ((int)&free_memory) - ((int)__brkval);
  }
  return free_memory;
}

/////called in the upgrade code/regen function like this
void RAM()
{
  clearLCD();
  mySerial.print(F("Free RAM: ")); //debug code
  mySerial.print(freeRam());   //debug code
}
8  Products / Arduino Due / Re: Happiness is SdFat with DMA SPI on: April 04, 2013, 10:58:45 am
So I'm planning to try out your improved DUE SPI / SD card library this weekend on my laser tag system.  I'll let you know how it goes.  I currently use the ATmega328P with your old SD library, but use file indexing to open files quickly.  Not very user friendly for coding, but it works.  Maybe I can retire the file indexing if this works much faster?

What is the status on this being implemented into the DUE library non beta?

http://code.google.com/p/beta-lib/downloads/list

9  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: April 04, 2013, 09:49:06 am
Looks good.   A lot more capacitors than I anticipated, and I wasn't sure if both crystals were necessary myself.

So what's the programming process w/ the USB attached directly to the MCU?  Erase program w/ the button, then hit reset and upload via arduino user interface or what?  Can you just upload a hex file with another program instead?
10  Products / Arduino Due / Re: what can be removed to make a "barebones" due? on: April 03, 2013, 08:12:44 pm
I too am looking for answers to both of these questions.
11  Products / Arduino Due / Re: DUE losing program while on 3.3V battery on: April 03, 2013, 07:57:53 pm
Hmm, so if I make my own SAM3X board I won't have this problem right?  I'm planning to program w/ an FTDI USB to serial chip w/ my own board and am using the DUE for prototyping purposes.  

So apparently I MUST power on 5V and can't use LiIon now, boo.

Any simple board modification that can work around this so I can use a 4.2V battery?
12  Products / Arduino Due / Re: print from flash memory broken on DUE? on: April 03, 2013, 07:54:59 pm
http://arduino.cc/forum/index.php/topic,153761.0.html

I can't tell, but is the above thread a solution, or work in progress?

copying this into my header fixed it for me for now.


Code:
#if defined(__SAM3X8E__)
    #define PROGMEM
    #define pgm_read_byte(x)        (*((char *)x))
//  #define pgm_read_word(x)        (*((short *)(x & 0xfffffffe)))
    #define pgm_read_word(x)        ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x)))
    #define pgm_read_byte_near(x)   (*((char *)x))
    #define pgm_read_byte_far(x)    (*((char *)x))
//  #define pgm_read_word_near(x)   (*((short *)(x & 0xfffffffe))
//  #define pgm_read_word_far(x)    (*((short *)(x & 0xfffffffe)))
    #define pgm_read_word_near(x)   ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x)))
    #define pgm_read_word_far(x)    ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x))))
    #define PSTR(x)  x
  #if defined F
    #undef F
  #endif
  #define F(X) (X)
#endif
13  Products / Arduino Due / print from flash memory broken on DUE? on: April 03, 2013, 07:37:58 pm
error: 'PSTR' was not declared in this scope

example:
  Serial.print(F("FAIL"));  //print the word 'FAIL' from flash memory, not RAM

vs.
  Serial.print("FAIL"); //print the word 'FAIL' from RAM, but this uses RAM very fast

Why am I getting this compile error in Aruino 1.52?  Do I need to add another library to be able to simply print from flash on the serial ports or using the LCD library?


14  Products / Arduino Due / DUE losing program while on 3.3V battery on: April 03, 2013, 07:35:18 pm
I am powering my arduino DUE with a 4.2V charged lithium ion polymer battery which feeds a 3.3V low voltage drop out regulator.  There is a 470 uF capacitor on the leads, and I tie it directly to the 3.3V pin.  I get about 3.279V with the multimeter.  After cycling power about 5 times, the arduino DUE loses its program, and I must re-flash the chip.  This happens every time, but does not do that when attached to USB 5V input.  Can the DUE be powered off 3.3V?  I see nothing in the schematic that says otherwise...
15  Products / Arduino Due / Re: Arduino Due libraries (official and 3rd party) on: April 03, 2013, 01:22:52 pm
I can confirm that the Xbee Library works on DUE.  I ported over my code and tested last night.

http://code.google.com/p/xbee-arduino/
Pages: [1] 2 3