Show Posts
Pages: [1]
1  Using Arduino / Microcontrollers / how to burn arduino bootloather on atmega328p on: November 16, 2012, 04:12:13 pm
Hello
I have arduino uno r3 and other atmega328p-pu chip and I want to burn on him bootloather
but I don't have another arduino board or 16MHz crystal.
Can I do something with this chip?
Thank you
2  Using Arduino / Displays / wh1602d lcd with arduino on: November 09, 2012, 05:14:17 pm
Hi guys smiley
I want to connect this lcd to my arduino uno but i don't know how do to it
I searched the Internet how to do it but didn't find something helpful
If you can help with this it's be nice
3  Using Arduino / Interfacing w/ Software on the Computer / Re: arduino+processing=proplem on: October 31, 2012, 03:33:28 pm
today before I tried your advice I did something that I thought that can solve the promblem and it Succeeded this is the new and working codes
arduino
Code:
int ledpin=9;
void setup() {
pinMode(ledpin,OUTPUT);
Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);
if(sensorValue>600){
  analogWrite(ledpin,0);
  Serial.println('0');
}
if((sensorValue<490)&&(sensorValue>350)){
  analogWrite(ledpin,50);
  Serial.println("1");
}
if(sensorValue<350)
{analogWrite(ledpin,255);
Serial.println('1');
}

}
processing
Code:
import processing.serial.*;
Serial port;
int brightness;
String bool="";
int index=0;
PFont font;
void setup()

{
  size(500,220);
port=new Serial(this,"COM4",9600);
font = loadFont("AgencyFB-Bold-200.vlw");
textFont(font,200);
}
  void draw()
  {
  background(brightness,brightness,brightness);
  fill(75,150,196);
  text(bool,80,175);
}
void serialEvent (Serial port)
{index=port.read();
  if(index=='1')
{
   
  bool="dark";
brightness=0;
}
if(index=='0')
{
  bool="light";
  brightness=255;
}}
4  Using Arduino / Interfacing w/ Software on the Computer / Re: arduino+processing=proplem on: October 30, 2012, 01:31:26 pm
i change the sensor value to 3 and send it to the serial
the procesing give me a unstable number
afther i add a delay of 500ms to arduino and the processing give me a 10 but in a few second is move to a very fast 3 or 50 and back to 10
thanks for repaly smiley

5  Using Arduino / Interfacing w/ Software on the Computer / arduino+processing=proplem on: October 30, 2012, 12:46:36 pm
Hello!
i tried to take a value from light sensor that connect to arduino uno and i succed to do it and turn on a LED.
after i tried to take the value to processing sketch that show if it is "light" or "dark"
but i always get a wrong value
here is the codes
i would like if someone halp me to find my mistake

arduino
Code:
int ledpin=9;
void setup() {
pinMode(ledpin,OUTPUT);
Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);

if(sensorValue>600)analogWrite(ledpin,0);
if((sensorValue<490)&&(sensorValue>350))analogWrite(ledpin,50);
if(sensorValue<350)analogWrite(ledpin,255);
Serial.println(sensorValue);
}


processing
Code:
import processing.serial.*;
Serial port;
String bool="";
int index=0;
PFont font;
void setup()

{
  size(500,500);
port=new Serial(this,"COM4",9600);
font = loadFont("AgencyFB-Bold-200.vlw");
textFont(font,200);
}
  void draw()
  {
  background(0,0,index);
  fill(46,209,2);
  text(bool,80,175);
  fill(200, 100,0);
  //to check if index have the corent value
  text(index,80,400);
}
void serialEvent (Serial port)
{index=port.read();
  if(index<=450)
{
    
  bool="dark";
}
if(index>450)
{
  bool="light";
}}
tnks smiley
Pages: [1]