Show Posts
Pages: [1]
1  Using Arduino / LEDs and Multiplexing / Re: 12 UV leds arduino on: October 14, 2012, 09:16:25 am
Thank you guys for the replay!!!

 johnwasser
i already desolder the leds from the tourch.
I m going to try to hook up them all.
Thanks for the tip!!!

Boffin1
Thanks for the warning!!!!
2  Using Arduino / LEDs and Multiplexing / 12 UV leds arduino on: October 13, 2012, 05:17:00 pm
Hello all !!!!
How can i get 12 UV leds running on 5v arduino ?????

12-LED UV Flashlight Silver (3xAAA)
http://dx.com/p/12-led-uv-flashlight-silver-3xaaa-4014

What resitor do i need for serial conection????

thank you for the help...
3  Using Arduino / Programming Questions / Re: Sending "060a" c# to arduino servo "a" on: July 25, 2012, 06:46:08 am
Ok, guys finally fixed the code, thank you for all of the  help. For all other ones looking for code to control 2 servos with C# .
NOTE: This is only for one but from here is a piece of cake!!!!!
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.IO;
using System.IO.Ports;

namespace botaoServoteste
{
    public partial class Form1 : Form
    {
        int posicao = 60;
        //byte[] data = new byte[1];

        public Form1()
        {
            InitializeComponent();
            //Decalracoes iniciais para comunicacao com o arduino
            sp.PortName = "COM3"; // porta com
            sp.BaudRate = 9600;   // Taxa de velocidade
            sp.DtrEnable = true;
            sp.Open();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            posicao += 10;
            string temp = "0" + posicao.ToString()+"a";
            string teste = temp;
            sp.Write(temp);
            //sp.Write(new byte[] { Convert.ToByte(teste) }, 0, 1);
            //sp.Close();
        }
   }
}

The arduino code can be copyed from the first post and fine tuned with AWOL replay
Thanks PaulS and dxw00d for the info in open() and close() serial port.

Screen print is the arduino serial Monitor sending the string. For c# is only a form and a button.
4  Using Arduino / Programming Questions / Re: Sending "060a" c# to arduino servo "a" on: July 25, 2012, 06:28:44 am
I understand and thank you PaulS, but if i comment out like
Code:
sp.Open();
            posicao += 10;
            string temp = "0" + posicao.ToString()+"a";
            string teste = temp;
            sp.Write(temp);
            //sp.Write(new byte[] { Convert.ToByte(teste) }, 0, 1);
            //sp.Close();
The problem still remains.......
5  Using Arduino / Programming Questions / Re: Sending "060a" c# to arduino servo "a" on: July 25, 2012, 06:13:16 am
Each time the button is clicked, the Arduino is reset, sent some data, and reset again. Is that REALLY what you want?
R- doesn't matter for now, it's only for testing.

Look the arduino code works fine, if you open the Serial Monitor in Arduino and insert the values.
 ex="030a" the servo 'a' will turn 30.

The problem is sending string value like this one "030a" in c#. If you knows who to do it Help will be well appreciated.

After this problem is fix i will fine tune the arduino code....  smiley-slim

Again: somebody knows who to do it????
6  Using Arduino / Programming Questions / Sending "060a" c# to arduino servo "a" on: July 24, 2012, 10:28:23 pm
it would be nice to get some help....

trying to control two servo motors by c# 2008
It connects to arduino uno board, see rx, tx lights flashing......

problem:
how to send a string = "030a" to arduino???? smiley-mad

arduino code:
Code:
#include <Servo.h>     

Servo servoX;  // cria objecto servo
Servo servoY;  // cria objecto servo
int posX = 0;    // variavel para guardar posicao do servo
int posY = 0;    // variavel para guardar posicao do servo

char buffer[4];
int received;

void setup()
{
  servoX.attach(10);         // indica que o servo esta conectado no pin9 do arduino
  servoY.attach(11);         // indica que o servo esta conectado no pin9 do arduino
  Serial.begin(9600);                                  //Inicia a porta serial
 
  servoX.write(070);                                    //Posicao inicial x, valores de alinhamento
  servoY.write(020);                                    //Posicao inicial y
  received = 0;

}

void loop()
{
  if(Serial.available())                              //Verifica se possui entrada de dados na entrada Serial
    { 
    //  Serial.println(buffer);     
      char c = Serial.read();                         // Se o "c" for igual ao caracter "A" (97 na tabela ASCII)
     if(c == 97)
        {
          Serial.println(buffer);
          int numero = atoi(buffer);
          servoX.write(numero);
          received = 0;
       }

    if(c == 98) // Se o "c" for igual ao caracter "B" (98 na tabela ASCII)
    {
      Serial.println(buffer);
      int numero = atoi(buffer);
      if(numero >= 15)                              // Se servo Y for maior que 15 graus(15 e o minimo de angulo sem forcar motor)
      {
        servoY.write(numero);
        received = 0;
      }
      received = 0;
    }
    if(c != 97 && c != 98)
    {
      buffer[received++] = c;
    }
    Serial.flush();
  }
}

in serial monitor "040a" works, servo "a" moves 40

C# code
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.IO;
using System.IO.Ports;

namespace botaoServoteste
{
    public partial class Form1 : Form
    {
        int posicao = 60;
        //byte[] data = new byte[1];

        public Form1()
        {
            InitializeComponent();
            //Decalracoes iniciais para comunicacao com o arduino
            sp.PortName = "COM3"; // porta com
            sp.BaudRate = 9600;   // Taxa de velocidade
            sp.DtrEnable = true;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            sp.Open();
            posicao += 10;
            string temp = "0" + posicao.ToString()+"a";
            string teste = temp;
            sp.Write(temp);
           // sp.Write(new byte[] { Convert.ToByte(teste) }, 0, 1);
            sp.Close();
        }
somebody knows who to do it????
sorry for the english...
7  Using Arduino / Programming Questions / C++ or C# good tutorial on: July 03, 2012, 07:32:40 am
 :smiley-eek-blue:There is any good tutorial for Arduino C++ or C#, insted of  Processing ???? Or who can i convert processing sketches to C++ or C# for arduino????

Thank you for your replay!!!!
8  Using Arduino / Project Guidance / Re: Array of 12 IR Leds on: June 28, 2012, 09:37:23 am
Update, Ok after desolding LDR, IR leds was constant on.... That means the LDR decreses the voltage for the leds until it cuts off.... smiley-eek
9  Using Arduino / Project Guidance / Re: Array of 12 IR Leds on: June 25, 2012, 05:14:41 pm
Thank you Riva for the replay!!!
I measure the voltage across the LDR and it sets on 8.4v with full light on.
There is another way????? Maybe if i only control the amount of current of the 6.3v(strange)red and yellow wire coming from video board.

10  Using Arduino / Project Guidance / Re: Array of 12 IR Leds on: June 25, 2012, 07:13:00 am
Thank you Riva for the replay!!!
But i don't see how to do it!!! Can you be more specific???
11  Using Arduino / Project Guidance / Array of 12 IR Leds on: June 24, 2012, 07:40:55 pm
Hello everyone, I need some help for this project,this is my first arduino project.
i'm triyng to fade up and down this array of 12 IR leds from a security cam.
There are 12v (external source).
I was wondering if there is a way to control the amount of current to brighten
up and down the leds by processing sketch or c# ????

Arduino Uno.

I allso was wondering if i take out the LDR and control it by
arduino. Is possible?????

Thank you guys for the support...

FRONT:

BACK:

Pages: [1]