Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Installation & Troubleshooting / Replacement diode Mega 2560 D1 on: August 03, 2014, 02:39:01 pm
I am not sure if this is the right place to post this.  I ended up frying the diode off the external power connector on my Arduino Mega 2560 and I am looking for a replacement. I am having a hard time trying to find this on Digikey or Mouser. The value is M7 on the Eagle file but I can't find a part number.
2  Using Arduino / Programming Questions / Re: What is needed for FTDI on: May 04, 2014, 01:04:28 pm
I have a 3RD pro mini that programmed successfully and was able to repeat the outcome. I am still unsure what is the issue is with the other two. Might be a poor connection with the header. Thank you everyone for the help.
3  Using Arduino / Programming Questions / Re: What is needed for FTDI on: April 22, 2014, 10:43:28 pm
My old sketch is still running so I am assuming the bootloader is still on there. I tried another mini that I have successfully programmed via ISP and receive the same error. I read that the FTDI might be flashed with the wrong settings so I downloaded Mprog and reflashed the eeprom with the default settings. then I read and parsed to verify everything was successful. I've also tried re installing the drivers several times.

4  Using Arduino / Programming Questions / Re: What is needed for FTDI on: April 18, 2014, 01:20:24 pm
I am assuming Arduino does have power the LED is lit; The middle pad and +5v are now solder together. I was able to program the mini using an Arduino Mega but now I am using the Mega for a permanent project and thats why I bought the FTDI programmer. More than likely the FTDI programmer is a clone.

Using a meter I verified TX pin to TX on the IC and the same for RX. I check both on the FTDI chip and the atmega328.

5  Using Arduino / Programming Questions / What is needed for FTDI on: April 18, 2014, 12:05:28 am
Hey guys,
Just bought a USB FTDI programming board. Having some issues with programming my arduino mini.  AVRDude
Below is how I have it connect.
FTDI Board - Mini
GND - GND
CTS - GND
VCC - VCC
TX - RX1
RX -TX0
DTR - DTR

I am running on Windows 8.1 using Arduino version 1.0.5,
Com Driver is CDM 10.00(the latest from FTDIChip.com)I have the set the com port to 7 and check the "Set RTS on Close"
I have Pro Mini 328 5V selected. I am unsure of what programmer to select I do not have an option for FTDI

I am getting avrdude: stk500_getsync(): not in sync: resp=0x00 as my error which I believe is communication error.

Please help
Thanks
6  Using Arduino / Programming Questions / Re: error: invalid types 'char[int]' for array subscript on: February 16, 2014, 09:18:35 pm
Thanks,
I actually found a better library that serves my purpose
7  Using Arduino / Programming Questions / error: invalid types 'char[int]' for array subscript on: February 16, 2014, 03:25:13 pm
I found this a while back not sure if it was originally written in c or c++... been trying to convert it to work with Arduino. I am just trying to make this bit work and will add some more in the future.

I keep getting the error: invalid types 'char[int]' for array subscript  on this line " encrypted += original[temp] ^ (int(key) + temp) % 255;"


Code:
char original = 'put me in a box, a box of worms';
char key = 'z';
char end;
char getKey;
int temp = 0;
String encrypted = "";
String unencrypt = "";

void setup(){
  Serial.begin(9600);
  end = original ^ key;
  getKey = original ^ end;
  Serial.println("Ready");
  delay(1000);

}
void loop(){
  Serial.print(original);
  c();
  delay(1000);
  d();
  delay(5000);
}
void c(){// add variable in future
  temp = 0;
  while(temp < sizeof(original)){
    encrypted += original[temp] ^ (int(key) + temp) % 255;
    temp++;
  }
  Serial.print("Encrypt: ");
  Serial.println(encrypted);

}
void d(){
  temp = 0;
  while(temp < sizeof(original)){
    unencrypt += encrypted[temp] ^ (int(key) + temp) % 255;
    temp++;
  }
  Serial.print("Decrypt: ");
  Serial.println(unencrypt);
}
8  Using Arduino / Programming Questions / Re: Help with TFT Display on: February 10, 2014, 07:50:40 am
Check out http://arduino.cc/en/Tutorial/TFTDisplayText

Also... which arduino are you using
9  Using Arduino / Programming Questions / Re: TFT LCD analog gauge on: February 09, 2014, 03:46:32 pm
I have something working now with a pot as my "sensor" I am getting a pretty interesting flickering wave effect. I've added delayMicroseconds; it helps a little. I might end up adding something where it just draws a line over the last position and see if that helps. Below is what I have so far.
 
Code:
#include <UTFT.h>
extern uint8_t SmallFont[];
UTFT myGLCD(ITDB32S, 38,39,40,41);   // Remember to change the model parameter to suit your display module!

void setup(){
  myGLCD.InitLCD();
  myGLCD.setBackColor(50, 50, 50);
  myGLCD.setFont(SmallFont);
}
double mD(double x, double in_min, double in_max, double out_min, double out_max)//Map double
{
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
void drawNeedle(int sensor,int pos_x, int pos_y){

  myGLCD.setColor(125,255,255);
  myGLCD.fillRect(50,50,150,150);
  double pi = 3.14159265;
  double x = 0; // setting variable to 0 is not needed, it will be written over anyways, it just looks good.
  double y = 0;// same as above
  double cur = mD(analogRead(sensor),0,1023,0,pi);
  int rad = 50; // radius 50 pixels
  x = pos_x + sin(cur + (pi/2)) * rad;
  y = pos_y + cos(cur + (pi/2)) * rad;
  myGLCD.setColor(255,0,0);
  myGLCD.drawLine(pos_x,pos_y,x, y); // (cx, cy, calculated x, calculated y)
  myGLCD.printNumF(cur,2,CENTER,10);//used for debugging 
}
void loop(){
  drawNeedle(0,100,100);
  delayMicroseconds(30000);//Added to reduce flickering
}
10  Using Arduino / Programming Questions / Re: TFT LCD analog gauge on: February 08, 2014, 02:12:45 pm
Thanks that helped a lot.
11  Using Arduino / Programming Questions / TFT LCD analog gauge on: February 06, 2014, 10:51:31 pm
I am using the library from http://www.henningkarlsen.com/electronics/library.php?id=51 to interface with my TFT LCD.  I want to make an virtual level gauge with an arm that pivots a center point like your gas gauge or pressure gauge. The sensor I am using is on A0 and A1. If there is already a post on this please point me in that direction... anything will help.

Thanks
12  Using Arduino / Programming Questions / Re: analogRead convert to voltage analogReference question on: November 18, 2013, 12:36:37 am
Thanks everyone for the feedback, after playing around I finally got something to work.
using Wikipedia and modified the map function
this is pretty much right on.

Code:
float R1 = 98100;
float R2 = 9750;

//VIN -----[R1]--+---[R2]---GND
//               |
//               A0


float Vout = 5; //max volt for analog pin
int minVolts = 0; //min volts
float maxVolts = Vout/(R2/(R1+R2)); // calculate voltage divider
// VOUT = (R2/(R1+R2))*VIN
// VIN = VOUT/(R2/(R1+R2))
// R1 = ((R2*VIN)/Vout)-R2
// R2 = R1/((VIN/Vout)-1)
const int batteryPin = 0;//analogPin

void setup(){
  Serial.begin(9600);
}

void loop(){
  int val = analogRead(batteryPin);
  float volts = mapFloat(val,0,1023,minVolts,maxVolts);
  Serial.println(volts);
  delay(250);
}

float mapFloat(float x, float in_min, float in_max, float out_min, float out_max)
{
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}




13  Using Arduino / Programming Questions / analogRead convert to voltage analogReference question on: November 11, 2013, 01:43:22 pm
Hello Everyone,
I have a couple of questions... I using a scale voltage divider to read the value of a car battery. Below is a rough schematic and code that I am using. the voltage I am reading with the arduino between sensorValue and GND does not match the voltage I am reading with my Multimeter.  I am assuming the default analogReference is External is this correct?
In the code below if I change the refVolt to what I read on my multimeter between aRef and GND then the voltage matches, but I notice the voltage on Aref is constantly changing.
In another part of my circuit(not shown below) I have a +5V Fixed-Voltage Regulator. is there a way I could set aRef to be a fixed 5 volts?









Code:
                                100k         10k
~12-15VDC --------^^^^-----^^^^-----GND
                                              |
                                     sensorValue (A0)
Code:
 
float refVolt = 5.0;
void loop(){
// read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (refVolt  / 1023.0);
  // print out the value you read:
  Serial.println(voltage);
}


14  Using Arduino / General Electronics / Semi-automatic transmission on: August 19, 2013, 11:08:59 am
If there is a post already about this please let me know.

has anyone tried making a Semi-automatic transmission(http://en.wikipedia.org/wiki/Semi-automatic_transmission) with Arduino and their existing automatic transmission? I know there are a few kits out there, but I think this might be a good open source project.
15  Using Arduino / Programming Questions / Re: Mega 2560 3.2 TFT touch screen on: August 09, 2013, 08:55:27 am
Thanks
those libraries worked...

Pages: [1] 2 3 4