Go Down

Topic: Made my own TwitterClient and I think it's better than the example one (Read 14 times) previous topic - next topic

JO3RI

Quote
Could you please help me to fix it? Do you have any idea of how I can solve it? Could your code help me to do it?
You'd be very helpful, really


are you able to show those characters on the serial monitor, when put into a string? (not from twitter, but when you just do Serial.print("those special characters"); ?

You can replace those &#241 , &#191, &#161 with the actual character. I did that in another project of mine (www.jo3ri.be/arduino/projects/castduino). You can start looking for &# with Textfinder and when found replace those with along with the according number.

Something like if &# and 241 than you have ñ.

also check google on "string replace" (http://www.cplusplus.com/reference/string/string/replace/)

Anders 2009

Nice work and thanks for sharing!

I have been playing with a similar idea for control purposes, but never actually built any of it.

A trick I find could help a lot to simplify the on-board Arduino logic would be to put a service in-between the Arduino and the Twitter API to act as a proxy and format translator.

The idea would be that you can use the right tool for the right job. Calling a REST webservice, parsing the results and doing something with the data is a piece of cake in most "internet languages", like Java, JavaScript, Ruby or PHP. With a such a proxy in place, you could re-format the response from Twitter into something very Arduino-friendly to save valuable CPU and RAM. It would also give you a separation of concerns and provide a place to add more advanced features like caching of results and adding in more sources without having to change the Arduino program.

Hosting of the translator proxy could be done on a server of yours, or on an application hosting service like the examples below.
http://www.heroku.com/
or http://nodejitsu.com/

Anders

JO3RI

Quote
Nice work and thanks for sharing!


Thanks ;-)

Quote
The idea would be that you can use the right tool for the right job.


Good point, but sometimes it's just fun to have all in one solutions.

Anders 2009



Code: [Select]
Good point, but sometimes it's just fun to have all in one solutions.

That is true and fun is one of the most important factors to consider. Why else would one have an Arduino hobby?


robtillaart

Quote
Why else would one have an Arduino hobby?

If you really want to know ask this in the bar sport section ;)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up