Show Posts
Pages: 1 ... 65 66 [67] 68 69 ... 252
991  Using Arduino / Programming Questions / Re: VirtualWire library on: March 18, 2014, 04:49:04 pm
You can expand the error box and take a screenshot.
992  Using Arduino / Programming Questions / Re: VirtualWire library on: March 18, 2014, 04:24:53 pm
Did you save it after you changed it? Post all the errors you're getting and your code. Please use code tags, its the # above the smiley faces.
993  Using Arduino / Programming Questions / Re: Cannot change focus on menu boxes on: March 18, 2014, 04:23:14 pm
Change_dose never gets set back to zero until you change the screen.
So for this section to work, change_dose must be set back to zero.

Quote
if (dosingato_screen == true){
     
      if((y >= 32) && (y <=60 )){                               // two y-coordinates
      if ((x >= 56) && (x <= 120)){                             //Touch Pump1 dose button
          if (change_dose == 0){                                //Selection to change dose Pump1
            waitForIt(56 , 32, 120, 60);
            change_dose = 1;
            Enter_new_dose = true;
            doseState = false;
          }
          y = 0;
          x = 0;
          }
          if ((x >= 177) && (x <= 239)){                        //Touch Pump2 dose Button
          if (change_dose == 0){                                 //Selection to change dose Pump2
            waitForIt(177, 32, 239, 60);
            change_dose = 2;
            Enter_new_dose = true;
            doseState = false;
          }
          y = 0;
          x = 0;
          }
         }
       
          if((y >= 133) && (y <=160 )){
          if ((x >= 56) && (x <= 120)){                         //Touch Pump3 dose Button
          if (change_dose == 0 ){                               //Selection to change dose Pump3
            waitForIt(56, 133, 120, 160);
            change_dose = 3;
            Enter_new_dose = true;
            doseState = false;         
          }
          y = 0;
          x = 0;
         
         
          }
          if ((x >= 177) && (x <= 239)){                     //Touch ATO dose button
          if (change_dose == 0){                                //Selection to change ATO dose
            waitForIt(177, 133, 239, 160);
            change_dose = 4;
            Enter_new_dose = true;
            doseState = false;
          }
          y = 0;
          x = 0;     
          }
         }
        }

To fix this you need to keep track of the pump your on and check to see if another pump is selected. If it is, set change_dose back to zero. The better way would be to get rid of "if(change_dose == 0)" and just check the button coordinates to see if you are within the button area. If you are, change the pump.
994  Using Arduino / Programming Questions / Re: VirtualWire library on: March 18, 2014, 03:08:43 pm
Did you remember to change WProgram.h to Arduino.h?
995  Using Arduino / Programming Questions / Re: Cannot change focus on menu boxes on: March 18, 2014, 02:46:39 am
Post a picture If you can of your screens. What it's showing and what it should be showing. Make sure your pictures are at a decent size before you post them, nothing too big or small.
996  Using Arduino / Programming Questions / Re: Cannot change focus on menu boxes on: March 18, 2014, 02:22:08 am
I see that but, if you can only see the change when you switch screens, then that leads me to think something is not allowing you to actually update the screen.  Try to debug your code by showing a number in the corner of the screen and see if the number increases as you go through the functions and if statements. This will let you know if your actually inside your print function.

I'll give you a link to my TFT extension library that works with your UTFU and UTouch libraries if your interested. It has all different buttons that may be of some use.
997  Using Arduino / Programming Questions / Re: Cannot change focus on menu boxes on: March 18, 2014, 02:08:01 am
I am regretting asking to see the full code and the name of your sketch has me scratching my head.

Aside from that, do you know if you're going into the Print_DoseAmount() function, once you change your amount?
998  Using Arduino / Programming Questions / Re: Cannot change focus on menu boxes on: March 18, 2014, 01:29:49 am
You need to post the full code, you can make it an attachment under Additional Options. And please format it, if not done already.
999  Using Arduino / Programming Questions / Re: Problem debouncing multiple buttons on: March 18, 2014, 12:30:02 am
Tell me something, why did you do this, when the array buttonNumber has the elements 0 - 7 in it already?
Quote
for(int i=0; i<8; i++)
{

cleardebounce(); //clears debounces variables
debounce(buttonNumber[ i ]); //debounces input pins
if(buttonlook==1) //loops through all the pins

As for the LCD, its possible it has something to do with all the LCD.setX();  and LCD.setY(); Check them again and see if your letter spacing is correct.
1000  Using Arduino / Programming Questions / Re: Help: Expected unqualified-id on: March 17, 2014, 08:52:01 pm
Quote
even though it was a small hint
Were you expecting an elaborate explanation to your error? If so, then here, when the compiler is going through the code and finds an error, it will give you a brief description like what you got. It will also highlight a line and usually the error is in the line before the highlighted one. So basically you need to be aware of what the error says and what is written on the previous line.

 Hopefully line numbers will be implemented into the arduino software soon.
1001  Using Arduino / Project Guidance / Re: First Arduino Project. Is it Possible and a good first build? Chicken Coop on: March 17, 2014, 08:41:38 pm
Quote
automatic coop door (power a 5 volt drill to open and close door based on sun rise sun set.)
You will need either a darlinton pair transistor or a relay to power the motor. Make sure you also use a separate power supply. You will also need to let the arduino know when sun rise and sun set is, so a RTC will be needed. You can also get the one that is shown in this library. DS1302 time library

Quote
Turn heat lamp on based on temp in the coop
Turn fan on based on temp in coop
This will of course need a temperature sensor and if you do a search for Arduino temperature sensor, you will find a lot on them and some code you can play with.

Quote
Turn a light on and off daily
This can go with the RTC used for detecting sun rise and sun set, you will just need to tell it to turn on and off at different intervals. Many RTC examples can be found with a quick search on the forum or google.

Quote
Have a display with temperature of coop.
You could get a small 16x2 LCD screen, which does have a library in the Arduino Playground/liquidCrystal. If you are low on usable pins, you may want to get a I2C 16x2 LCD instead.

Quote
power indicator lights on out side of coop for the following:
This is simple enough, but depending on the lights used, you may need transistors or a relay.

Quote
-low water (float switch)
-Door Open (limit switch)
These too should be very simple to do, and there may even be a water level sensor other than a float switch, that you can use.
1002  Using Arduino / Programming Questions / Re: Help: Expected unqualified-id on: March 17, 2014, 08:16:03 pm
Quote
void maneuver1(int speedlift, int msTime);
void maneuver2(int speedLeft, int speedRight, int msTime);
Why do you have semicolons here?
1003  Using Arduino / Programming Questions / Re: Arduino Memory Leak on: March 17, 2014, 08:10:00 pm
Why do you keep making a new array, other variables here?

Quote
ISR(TIMER1_COMPA_vect){
int pixels [screenWidth] [screenHeight] [3];//array stores intended pixels as RGB
  int mag, dist;//mag is for magnitude (brightness), dist is for distance from line center

Make them either global at the top, or static. Do this to any other variables like this through out your code too. The FOR loops should be ok, but I am not certain. If it still keeps crashing, then fix the FOR loops.
1004  Using Arduino / Programming Questions / Re: Bits moved one place to the right... on: March 17, 2014, 01:12:39 pm
I don't really see the problem. Your array can hold 33 elements (0 - 32) and you have 33 elements in the array. If you try to add more when the array is full, it will overwrite the elements starting at index 0.

Or if the arduino is smart enough, it will stop storing the elements when the array is full. But I don't think it is.
1005  Using Arduino / Programming Questions / Re: keywords.txt file bug on: March 17, 2014, 01:07:39 pm
The function name and the "KEYWORD" must have a single tab space ( or 4 spacebar presses) between them. NOTE the spaces will not all look the same, but if you know you pressed tab once, then save it, the function names will be in color.

Example:
Somefunct   KEYWORD1
Pages: 1 ... 65 66 [67] 68 69 ... 252