Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Embedded PC Won't Boot With Arduino? on: February 13, 2011, 11:28:44 am

I'm building a solution that uses an Arm-based embedded Linux PC (a Technologic TS-7553) with an Arduino (currently using a Duemilanove).

The Arduino is powered by the USB port. If the Arduino is plugged into the USB when power is applied to the PC, the PC will not boot.

While searching the forums, I found information regarding when the Arduino was powered separately, but I haven't found any people having problems booting with the Arduino powered by USB. I tried a powered USB hub, which didn't seem to make any difference.

I'm thinking this sounds like it may be a problem with the PC, and I also have a query into the manufacturer. But I'm wondering if anyone here may have some guidance. I'm much more a programmer than an electronics expert, so any guidance is appreciated!

2  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Memory leak in WString / TextString Library? on: June 22, 2010, 06:37:23 pm
Many thanks for this thread. It has helped a very frustrating problem!

But once I place the destructor in my code (or download the new zip...same thing), it doesn't function the same any more. Here's the relevant code:
void somefunction()
  char* timestamp = isoTimestamp();

// iso8601 timestamp of current time
char* isoTimestamp(){
  Serial.println("in isoTimestamp");
  time_t t = now();

  Serial.println("Allocating String(20)");
  String str = String(20);

  Serial.println("Formatting timestamp");
  if(month(t) < 10) str.append("0");
  if(day(t) < 10) str.append("0");
  if(hour(t) < 10) str.append("0");
  if(minute(t) < 10) str.append("0");
  if(second(t) < 10) str.append("0");

  Serial.print("isoTimestamp: ");
  char* outputChars = str.getChars();

  Serial.print("char isoTimestamp: ");

  return str;

The above prints:
in isoTimestamp
Allocating String(20)
Formatting timestamp
isoTimestamp: 2010-06-22T23:33:23Z
char isoTimestamp: 2010-06-22T23:33:23Z

Note the two first bytes in the returned char* are wrong/odd (it isn't really a '?', but it was interpreted as a newline in the forum post). This occurs whether I "return str;" or "return str.toChars();"

I'm still pretty new to Arduino, and haven't messed with C-based stuff (aka pointers) since college long ago, so hopefully this is just a newbie mistake. But it worked fine before adding the String destructor. Well, other than the memory leak, anyway! Can someone help?

Thanks in advance.
Pages: [1]