Show Posts
Pages: 1 [2] 3 4 ... 6
16  Using Arduino / General Electronics / Re: Need 25kHz PWM signal for 4 pin PC fan on: January 29, 2014, 08:42:05 am
ok I will have a look at that.. and there is not need for a fail safe.. the Intel standard requires fans to max rpm when there in no signal
17  Using Arduino / General Electronics / Need 25kHz PWM signal for 4 pin PC fan on: January 29, 2014, 04:01:57 am
Hey Guys,
I want to make a PWM fan controller from my PC because the stock one is just horrible.. But i need help designing a circuit and finding parts..
It needs to follow this standard

I plan on being able to change the fan speed through usb..

If any one could give me a hand, that would be greatly appreciated..
18  Using Arduino / Project Guidance / Re: New Servo and Sensor project - need help!! on: October 28, 2013, 06:55:39 pm
Okay connect the servo and the HC-SR04 to the arduino and run through some example code.. Once you have done that and have an understanding of how you can get them to work together, start thinking about how you want your final project to behave. Then try to write a sketch to do that..
do you want a button that will ignore any reading from the HC-SR04,
do you want to only turn the light on if it is dark...
Then get back to us.. smiley
19  Using Arduino / Programming Questions / Re: mouse control with potentiometer on: October 21, 2013, 06:01:38 pm
how can i solve this
Make sure your potentiometer is connected correctly. Serial.print() the value read from the pin. Of course, this means that you can't call analogRead() in the map() call, but you shouldn't be doing that, anyway.

Serial.print() the mapped value. Is it what you expect?

No need to print the value.. He is using the Leonardo. He can just continue using the Mouse library.
Scratch that.. Didn't read your post fully..
20  Using Arduino / Interfacing w/ Software on the Computer / Re: Python errors when receiving data from Arduino on: October 21, 2013, 11:19:55 am
Use this to check if there is anything in the buffer.

if ser.inWaiting():
                newInput = ser.readline()
                print newInput

.inWaiting() returns the number of chars in the buffer.

As for your other problem I can't help you there
21  Using Arduino / Interfacing w/ Software on the Computer / Re: arduino and pc on: October 21, 2013, 09:07:23 am
can i use arduino to start the pc and run processing sketch file after that???
Sure, you only need to short the two power wires to start the computer up, and then just put a processing sketch thats been exported (or a shortcut to said program) in the the startup folder and it will auto run.

P.S I don't recommend messing around with your computer unless you know what you are doing..
22  Using Arduino / Programming Questions / Re: Creating columns in a CSV file? on: October 14, 2013, 08:47:53 pm
Thanks for the reply Pete.

I tried that above but it wrote it first instead. See code above.
Full code please
23  Using Arduino / Programming Questions / Re: [SOLVED] Trouble passing integer values from Uno to Mega using rx-tx on: September 02, 2013, 11:04:36 pm
That sounds great. I was going to make something like this awhile back but never got around to it. anyway once you finish you should look into post a guide with the code a schematics and so other can make it.

Good luck!!  smiley-wink
24  Using Arduino / Programming Questions / Re: Trouble passing integer values from Uno to Mega using rx-tx on: September 02, 2013, 09:15:39 pm
OMG it works!!!!!!!! Nice! You guys are great to have available to answer questions. Can't thank you enough, I may even sleep tonight.

Hope after I get a lot more under my belt I can return the favor to others. Thank you so much!
smiley smiley smiley
Great to know!! Can you post your new code? Also if you can add [SOLVED] to the title so if anyone is looking for help they can try here.
25  Using Arduino / Programming Questions / Re: Trouble passing integer values from Uno to Mega using rx-tx on: September 02, 2013, 08:55:14 pm
Oops this one was my fault
 if(dataRefreshed = true){}

  if(dataRefreshed == true){}
Both may work, but the latter is easier to read at a glance.

The code i posted will not print anything until it has been sent the "endOfNumberDelimiter"
So in "processInput" you will need to change "dataRefreshed" to true, if you are sent the "endOfNumberDelimiter".

You need to have this inside the same if statment that you are printing in, not outside of it.
dataRefreshed = false;
if(dataRefreshed == true){
  Serial.print("I'M TALKING HERE!!");
  dataRefreshed = false;
26  Using Arduino / Programming Questions / Re: Extracting Data from SoftwareSerial on: September 02, 2013, 07:57:40 pm
It would be easier to help if you could supply some example input..
27  Using Arduino / Programming Questions / Re: Trouble passing integer values from Uno to Mega using rx-tx on: September 02, 2013, 07:48:20 pm
If you add this code, it should only print once the data has been refreshed.
bool dataRefreshed = flase; //Declare as global variable
void loop(){
  if (Serial1.available ()) {
    processInput ();

  if(dataRefreshed == true){
    //Print outputs here
    dataRefreshed = false;
You will need to set dataRefreshed to TRUE when you find the end delimiter
28  Using Arduino / Programming Questions / Re: Serial.Read on: August 08, 2013, 03:52:20 am
you can not compare strings the way you have.. You must use .equals()
String myString = "Hello";
String thisString = "World";

if(myString.equals(thisString)){ // this is the same as myString == thisString
    //it works
if(myString.equals("Add a String here")){ // this is the same as myString == "Add a String here"
    //it works

For more details check this reference page:
29  Using Arduino / Programming Questions / Re: Serial? on: August 04, 2013, 12:09:54 pm
I dunno who to quote, since you're all helping me out quite a bit so I'll just throw this out here... I don't really mind if it doesn't send the data as "MY" or "MN" or whatever. I assume if I send M from Python encoded as ASCII, would need to return a number? Also, edited the OP with code tags.

Tried tigerbomb's solution and it didn't seem to work. Pin 12 NEVER even goes high.
I tested it with the arduino IDE serial monitor and is seems to work fine
You need to import the time library and then call the following code before you try to send anything but after you have opened the port. This will give enough time for the Arduino to reset
import time

here is an example
import time, serial, sys


ser = serial.Serial(SERIALPORT, 9600)

30  Using Arduino / Programming Questions / Re: Serial? on: August 04, 2013, 07:28:43 am
Try incorporating this into your code..
This will take chars from the buffer and add them to a string called serialInput
If you use this code you need to send your data surrounded by a '<' and '>'
e.g <MY> or <MN>
const char startOfDelimiter = '<';
const char endOfDelimiter = '>';
String serialInput;
boolean allowInput = false;


void setup(){
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(12, OUTPUT);


void loop(){
digitalWrite(12, HIGH);
if(serialInput.compareTo("MY") == 0){
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
}else if(serialInput.compareTo("MN") == 0){
digitalWrite(10, HIGH);
digitalWrite(9, LOW);


void processInput(){
char inputedChar =;
   case startOfDelimiter: //Preps anything for an input
    serialInput = ""; //Clears "serialInput" ready for new input
    allowInput = true; //Allows characters to be added to "serialInput" in the default case

   case endOfDelimiter:
    allowInput = false;
    while(Serial.available()){ // Clears the buffer of any extra junk after the end delimiter; //
  } //

    if(allowInput == true){ // Add the inputed chars to the string if the starting delimiter has been sent
    serialInput = serialInput + inputedChar;
    while(Serial.available()){ //Clears the buffer;

P.S I know this is going to keep adding chars to the string.. going to fix it and repost
Should Will work now!
P.P.S can an admin look into making tab stops equivalent to 2-4 spaces.
Pages: 1 [2] 3 4 ... 6