Show Posts
Pages: 1 [2] 3 4
16  Using Arduino / Programming Questions / Re: Mega 2560 3.2 TFT touch screen on: August 09, 2013, 08:55:27 am
Thanks
those libraries worked...

17  Using Arduino / Programming Questions / Mega 2560 3.2 TFT touch screen on: August 08, 2013, 10:01:13 pm
is there a library for the mega 2560 and a TFT touch screen.

trying to use the sample from http://arduino.cc/en/Tutorial/TFTDisplayText but I get a white screen.

are there different pins for the mega for
// pin definition for the Uno
#define cs   10
#define dc   9
#define rst  8 

I will try to add some more information about the screen tomorrow when I am not so tired.
18  Using Arduino / Programming Questions / Re: understanding analogWrite on: July 09, 2013, 09:41:02 am
Thanks for the feedback... That makes a lot of sense
19  Using Arduino / Programming Questions / understanding analogWrite on: July 03, 2013, 10:40:37 am
I am not too sure how to word this. I am usually programming c# or php...

I know that analogWrite generates a PWM signal.

I believe atmega executes one line of code at a time.

I am trying to understand if there would be any lag with the PWM signal if my application has a lot to execute or does the analogWrite run in the background?

20  Using Arduino / General Electronics / Re: RGB LED's and the color white on: April 23, 2013, 08:46:45 pm
That's good to know.
Thanks for the quick reply.
21  Using Arduino / General Electronics / RGB LED's and the color white on: April 23, 2013, 01:37:53 pm
With computer software, to create the color white... You set the red green and blue values to their max. However I am not sure if this would be the same with an RGB LED. Does anyone know if turning on the red, green, and blue LED at the same time would give the illusion of the color white? if not, what can be done to achieve the color white.
22  Using Arduino / Motors, Mechanics, and Power / Re: 120VAC motor 4watt 60hz speed control -- help on: March 17, 2013, 02:55:06 pm
Thanks for the reply.
I will probably take a different route for this.
23  Using Arduino / Motors, Mechanics, and Power / 120VAC motor 4watt 60hz speed control -- help on: March 13, 2013, 02:22:57 pm
I consider myself new to electronics so please bare with me. I live in the US and most outlets are 110V-120V AC
I was thinking of using an Arduino to create a speed control for an AC motor. I am looking for an easy and cheap solution.The motor is 120 VAC 4watts 60hz.

I know PWM is efficient way of speed control and that is why I am considering Arduino. I was thinking of using a mosfet for the switching but I think I should have something that isolates the HV from the LV so I don't destroy the Arduino. I also have the guts from an old phone charger that I am using to power the arduino.

Also I was thinking of making a full bridge rectifier for the ac to dc. but I am a little confused on the voltage output if I do that. On some forums I've read that the voltage is multiplied by ~1.4 when converted from AC to DC and others I am reading it's divided by ~1.4.


24  Using Arduino / Programming Questions / Re: Need help exit for(;;) on: February 05, 2013, 09:48:31 pm
TexasStingray - Not sure how I am going get the value to change as of right now, I will play around with what I have and see if I can figure out something. As per lloyddean request, I am going to wait to make any more post until I can "clarify" on what I am trying to accomplish.
25  Using Arduino / Programming Questions / Re: Need help exit for(;;) on: February 05, 2013, 07:16:32 pm
I think what you are trying to do would require an interrupt. you appear to want to run a loop and display a value and then if that value changes it would be displaying the new value. I could be wrong but I too am still learning the Arduino. you will have to have the variable you want to display define as a global as volitile so that the interrup function could change the value. My understanding is that when am interrupt is called all control does to the interrupt function and all current processing stops until the interrupt function is completed, at which time the process continues. Hopes this helps.

Pretty much what he said. If the value changes, I want the loop to reflect that change.
26  Using Arduino / Programming Questions / Re: Need help exit for(;;) on: February 05, 2013, 03:21:30 am
I am sorry for not being so clear. I am still new to arduino and embed programming.
It doesn't have to be a for( ; ; ) loop. I just need a loop that will continue... if I pass new information to that loop it will continue with the new information.

I know that the loop() will continue but it continues with one function at a time...At least that's how it seems with some other code I have used.

I really do appreciate all the feedback and help I am getting and hopefully this will help me with future post.
27  Using Arduino / Programming Questions / Re: Need help exit for(;;) on: February 05, 2013, 02:22:35 am
break exits a loop. What is the problem exactly?

I thought about this... and this is what I am trying to do, in a little more detail. I have a loop that is in function more. I want the serial output that is inside of the loop to change(if that makes any sense). So if you look of void loop() you will see more is called twice with different values. If you got to the serial monitor, it just shows the first value.

Code:
void setup()
{Serial.begin(9600);
Serial.println("Starting...");

}
void loop()
{
more(1,3);
delay(3000);
more(3,5);
delay(3000);
}

void more(int x,int y)
{
  int z = x + y;
  for(;;)
  {
  Serial.println(z);
  delay(250);
 
  }
 
}
28  Using Arduino / Programming Questions / Re: Need help exit for(;;) on: February 03, 2013, 11:36:10 pm
Thanks everyone for the reply
I will have to try to clean up my code. For some reason I am having issues with my if statement and causing the break.
29  Using Arduino / Programming Questions / Need help exit for(;;) on: February 03, 2013, 04:11:46 pm
I hope you guys can help me. I am trying to exit a for(;smiley-wink loop or would like to know of another alternative if it is impossible to exit this kind of loop.

It would be nice to run an infinite loop until some input will stop it.

Code:

//Code is more of example...
void setup()
{
}
void loop()
{
  process(12,300);//random values just as example
  delay(5000);//delay 5 seconds
  process(12,500);
  delay(5000);
}
void process(int x, int y)
{
  for(;;)//Create infinite loop
  {

      // Loop until command to stop
    if(!condition)//Need help with this
    {
      break; // Stop loop
    }
  }
}
30  Using Arduino / Motors, Mechanics, and Power / Re: Controller PC fans 3-Pin vs 4-Pin on: January 31, 2013, 06:39:49 pm
Filter worked and change some stuff with timing worked great.
I am using the mega 2560

Instead of using the define PWM pins, I am wondering if I can use any digital pin as PWM?
Code:
int fan = 12;
int dT = 500;//uS

void setup()
{
  pinMode(fan, OUTPUT);
}
void loop()
{
  digitalWrite(fan, LOW);
  delayMicroseconds(dT);
  digitalWrite(fan, HIGH);
  delayMicroseconds(dT);
}

has anyone played around with this?
 Are there any libraries?
Can I achieve high frequencies by doing it this way or will have have issues?
Pages: 1 [2] 3 4