Help getting Tweener C++ working with arduino

Hi,

is there any way, to get this Library:

http://code.google.com/p/cpptweener/

working with arduino? I´ve put it inside the library folder, but at compile time, i get a lot of errors (list, vector, iostream).
I´m really no C++ developer. :frowning: But i need a good tweening library. The one here isn´t complete: http://wiki.dataflow.ws/LibInteract :frowning:

greetings,
André

Hi André,

This library is not for the Arduino so far as I can see - Google Code Archive - Long-term storage for Google Code Project Hosting. - Arduino does not run Flash.

You probably need a proxy on the PC/Mac to get it to work with an Arduino.

Rob

Hi Rob,

the one you posted is written in Flash, you are right. But the one I posted is written in C++ (a C++ port of the Flash Tweener) and should run on arduino, I think. But it won´t compile and I don´t know what exactly I have to change. ;o)

http://code.google.com/p/cpptweener/

greetings,
André

But the one I posted is written in C++ (a C++ port of the Flash Tweener) and should run on arduino, I think.

Not if it depends on stuff in the std namespace, like lists, vectors, etc. Lists and vectors all rely on dynamic memory allocation, and the Arduino has precious little of that.

Hm, that´s bad. Did anyone know a good tweening/ramping library? I need to tween/ramp intergers (floats are also good).

thx,
André

You could check the website of Nick Gammon (you can find him on this forum). He is busy porting the std libraries to Arduino. .

He is busy porting the std libraries to Arduino.

That should be "some of" the std libraries.

I need to tween/ramp intergers (floats are also good).

From what to what? Over what interval/time period? For what purpose?

I need to tween/ramp intergers (floats are also good).

Unless you need something fancy, isn't this simple interpolation?

From 0 to 180 to 0. The duration belongs to an analog input. 15 ms up to 5000 ms. Hm, the best way will be to write a simple function that handles the ramping based on current millis(). I thought I could use some library (the easy way ;o)), but seems there isn´t one.

thx for your help! :o)
André

Will map() do what you need?

http://arduino.cc/en/Reference/Map