Loading...
Logo
Processing Forum
derecik1's Profile
2 Posts
7 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    I do not have very much experience with image loading techniques and after doing some more research, I am not sure how to best go about what I want to do. I would like to take the charge value from an arduino analog input (that part is working fine) and display it as a "power level chart". Basically some thing simple like the battery icon on a laptop or an ipod that shows how "full" the battery is. I tried to find a way to load the image according to the voltage value, but I don't know if this is making it too complicated? Any ideas on how to best approach this? Sorry I don't have anything to show, I really didn't get anywhere with stuff I tried so I figured I should ask for a push in the right direction...
    Hello, 

    I'm a bit new to Processing, but I think I understand the general format. I am trying to use a serial input from arduino to control the frameRate on an animated gif. I tried making a loop that would increment the frameRate each time the sequence loads, but this didn't work and when I print out the frameRate() value it always returns 10. 

    Am I doing something, or is it not possible to change the frameRate like this? Could I use a delay in the loop instead?

    Thanks!

    I am working off of the Sequence Animation example:

     for ( int i=1; i< 5; i++){ 
     frameRate(i);  
      images[0]  = loadImage("PT_anim0000.gif");
      images[1]  = loadImage("PT_anim0001.gif"); 
      images[2]  = loadImage("PT_anim0002.gif");
      images[3]  = loadImage("PT_anim0003.gif"); 
      images[4]  = loadImage("PT_anim0004.gif");
      images[5]  = loadImage("PT_anim0005.gif"); 
      images[6]  = loadImage("PT_anim0006.gif");
      images[7]  = loadImage("PT_anim0007.gif"); 
      images[8]  = loadImage("PT_anim0008.gif");
      images[9]  = loadImage("PT_anim0009.gif"); 
      images[10] = loadImage("PT_anim0010.gif");
      images[11] = loadImage("PT_anim0011.gif"); 
      println(i);
      //delay(10000- (i *100));
      println(frameRate);
     }