3g sim ethernet inside printer?

Breakout boards, sensors, Drawdio, Game of Life, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Re: 3g sim ethernet inside printer?

Postby t man x » Sun Apr 22, 2012 3:38 am

Hello

I've assembled the printer and ethernet board as per the instructions and I cannot get it to work. Weird thing is it only finds the IP address when the programming cable is plugged into the computer, then it has no problem finding the tweets - but when I take the cable off, the green button light no longer flashes and when I ping the IP it says destination host unreachable.

What could it be? Is it because I'm not using the power adapter provided (tho I bought it from oomlout as per their helpdesk instructions)

Also, the printer quality is not great, it's always faded, tho thats a side issue for now.

Any help please!
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby t man x » Sun Apr 22, 2012 3:41 am

Also I just noticed, it prints clearly when the power is off and only the programming wire is plugged in :?
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby adafruit_support_bill » Sun Apr 22, 2012 6:02 am

When the USB cable is connected, the device draws power from your computer. But most computers limit the power to the USB port to about 500mA. The printer prints with heat and will pull as much as 1500 mA @5v during printing. What is the rating of the supply you got from oomlaut?
User avatar
adafruit_support_bill
 
Posts: 15898
Joined: Sat Feb 07, 2009 9:11 am

Re: 3g sim ethernet inside printer?

Postby t man x » Sun Apr 22, 2012 6:09 am

Here is what it says on the adapter

Input: 100-240V~47-63Hz 0.19A MAX
Output: 9.0V --- 0.6A 5.4W MAX
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby adafruit_support_bill » Sun Apr 22, 2012 8:04 am

Sorry, I should have mentioned the current requirements before. 0.6A is not going to be enough. That's probably why the print looks faded.
Here's the power requirements from the spec sheet:
Requires 5-9VDC @ 1.5Amp power supply
User avatar
adafruit_support_bill
 
Posts: 15898
Joined: Sat Feb 07, 2009 9:11 am

Re: 3g sim ethernet inside printer?

Postby t man x » Mon Apr 23, 2012 10:50 am

Thanks for that will order another one, I know these things happen :P

On the programming side of things, I can't get the printer to work when I increase the values for msgText and value

Code: Select all
char
  *serverName  = "search.twitter.com",
  // queryString can be any valid Twitter API search string, including
  // boolean operators.  See https://dev.twitter.com/docs/using-search
  // for options and syntax.  Funny characters do NOT need to be URL
  // encoded here -- the sketch takes care of that.
  *queryString = "from:Adafruit",
  lastId[21],    // 18446744073709551615\0 (64-bit maxint as string)
  timeStamp[32], // WWW, DD MMM YYYY HH:MM:SS +XXXX\0
  fromUser[16],  // Max username length (15) + \0
  msgText[141],  // Max tweet length (140) + \0
  name[11],      // Temp space for name:value parsing
  value[141];    // Temp space for name:value parsing


How can I increase this? I'd like to use a maximum value of 500.
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby adafruit_support_bill » Mon Apr 23, 2012 10:56 am

You may be running out of RAM. The Atmega 328 only has 2K.
User avatar
adafruit_support_bill
 
Posts: 15898
Joined: Sat Feb 07, 2009 9:11 am

Re: 3g sim ethernet inside printer?

Postby t man x » Mon Apr 23, 2012 10:59 am

Is there anyway to check specifically? I hope this is not the case :(
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby adafruit_support_bill » Mon Apr 23, 2012 11:33 am

Remember that RAM is needed for the stack too. If your stack overflows into the heap, the results are unpredictable (but never good). If you really need more, you should consider stepping up to a MEGA.
http://itp.nyu.edu/~gpv206/2008/04/making_the_most_of_arduino_mem.html
Code: Select all
    // this handy function will return the number of bytes currently free in RAM, great for debugging!   
    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;
    }
User avatar
adafruit_support_bill
 
Posts: 15898
Joined: Sat Feb 07, 2009 9:11 am

Re: 3g sim ethernet inside printer?

Postby t man x » Sat Apr 28, 2012 11:04 am

It comes back with 673, does this mean I can only output, i.e. send 673 characters to display in the print?
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby adafruit_support_bill » Sat Apr 28, 2012 11:36 am

Is that before or after you increase the buffer size? You need probably to reserve some 'headroom' for the stack too. You can probably free up more ram by moving some of the literal strings in the sketch to flash memory:

From the Arduino 1.0 release notes:
Support has been added for printing strings stored in flash (program
memory) rather than RAM. Wrap double-quoted strings in F() to indicate
that they should be stored in flash, e.g. Serial.print(F("hello world")).
User avatar
adafruit_support_bill
 
Posts: 15898
Joined: Sat Feb 07, 2009 9:11 am

Re: 3g sim ethernet inside printer?

Postby t man x » Sat Apr 28, 2012 12:05 pm

I notice by printing more it doesn't make a difference to the 673 figure.

I'm not familiar with C so can't answer those questions. All I'm trying to do is print all the characters from a feed directly to the printer, max 1000 characters. Possible?
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby adafruit_support_bill » Sat Apr 28, 2012 12:12 pm

There is no limit to the number of characters you can print. You just can't create buffers bigger than the available memory space. Just read until the buffer is full, print it, then start over again.
User avatar
adafruit_support_bill
 
Posts: 15898
Joined: Sat Feb 07, 2009 9:11 am

Re: 3g sim ethernet inside printer?

Postby t man x » Mon Apr 30, 2012 6:50 am

Code: Select all
avrdude: stk500_getsync(): not in sync: resp=0x00


I keep getting the above error when trying to upload, have I burnt the board by any chance?
t man x
 
Posts: 35
Joined: Sat Mar 03, 2012 8:28 pm

Re: 3g sim ethernet inside printer?

Postby adafruit_support_bill » Mon Apr 30, 2012 6:58 am

Double check your board settings and verify that the board is still assigned to the same COM port (sometimes it changes). Also try a different cable and/or USB port.
User avatar
adafruit_support_bill
 
Posts: 15898
Joined: Sat Feb 07, 2009 9:11 am

PreviousNext

Return to Other Adafruit products

Who is online

Users browsing this forum: mibignistinly and 7 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [105]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]