4dsystems serial OLED display using Newsoftserial?

I was just wondering if anyone has a 4dsystems oled display working with the newsoftserial yet? Rightnow the only only way I can use the display and still program the arduino is to use the Mega because of the multiple serial ports.

Mike

I'm using a 4d LCD display with SoftwareSerial (Arduino 1.0).

I have not installed Arduino 1.0 yet. Just waiting until all the bugs are worked out. Was it difficult converting your old code over to use the newsoftserial ?

I originally wrote my 4dSys library using exclusively NewSoftSerial, only changed it to work with both soft and hardware serial after it was "complete". You shouldn't see any difference between using hardware or software serial for working with the 4D screens, only thing I found was needing to increase the default buffer size when block reading from the SD card. Just make sure you're using the latest (beta) version, which should be the same as the one that will replace the old SoftwareSerial library in 1.0.

Do you have any of your code available that I could build off of?

My library is available here
http://arduino.cc/forum/index.php/topic,64234.0.html

And avenue33 has written a library for the more advanced 4D controller in their touch screens. The commands are all the same as for the small OLED screens, but some of the parameters are different. It could easily be adapted with just a little work. You can find his library here
http://arduino.cc/forum/index.php/topic,60802.0.html

Thanks for the code. Grabbed the latest newsoftserial ,replaced the old and had the random rectangles on the screen. No possibility of adding a transistor to the power pin of the display on my project so I tried removing and then editing display.powerUp(); so the display would be always connected to 5V but have not had luck yet. It probably a timing thing.

Thanks,
Mike

0miker0:
I tried removing and then editing display.powerUp(); so the display would be always connected to 5V but have not had luck yet. It probably a timing thing.

Pardon?

All you need to do to disable the power or reset pin functionality is just set that pin to -1 when you setup your object.

The library isn't really setup to properly use the reset pin, but if in the constructor you change the digitalWrite to _resetPin to LOW instead of HIGH and then change the powerDown function to this

bool G4D::powerDown()
{
  char retVal;

  bool success = false;
  retVal = control(G4D_DISPLAY_CONTRAST,0);
  if(retVal == true) {
	  success = true;
  }

  retVal = control(G4D_DISPLAY_ON,0x00);
  if(retVal == true) {
	  success = true;
  }

  if(success == true) {
	  delay(150);
	  if(_resetPin>-1) digitalWrite(_resetPin, LOW);
	  if(_powerPin>-1) digitalWrite(_powerPin, LOW);
	  return(true);
  }
  return(false);
}

Then you should still get proper functionality out of the startup and shutdown code without a power transistor.