Going to Arduino from C#, Java, … string trouble

As I posted some weeks ago, if you need to work with strings (or, better, character arrays) in Arduino’s C++, coming from a friendlier development environment, things reveal to be quite hard.
There are anyway two approaches that can relief the pain:
1) An F() procedure exists, moving every declared string from the highly expensive SRAM (in Arduino UNO 2kB) to flash memory (32 kB). I used this method and solved my intermitting (and making me crazy…) problems
2) Using PString library, added by NewSoftSerial and put in official version of Arduino. It is very handy: it hands you a nice object managing a char array and allowing you to modify and search your string


One response to “Going to Arduino from C#, Java, … string trouble

  1. Pingback: Arduino as a PLC | Hydroinformatix the Gaul

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s