Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: LCD 3310 Shield and sw1 reset switch on: February 20, 2011, 10:57:26 am
I want to, press this switch in software one time.


2  Using Arduino / Programming Questions / LCD 3310 Shield and sw1 reset switch on: February 20, 2011, 10:49:37 am
I have question, it is possibly to in arduino software, this switch(sw1 on shield) turn on or turn off ?


thanks for feedback

beste regards malin
3  Using Arduino / Programming Questions / how to send byte array via com on: February 11, 2011, 08:45:03 am
Hi,


I want to send via com from PC(C# application) array of byte (100 elements in array), what is the best method for do this ?

I tray do it in loop, but something is wrong becuse when i read message from arduni i take result that when I send example arrayExampe[30]=220, i receive from arduino message that he has 3 elements 2,2,0.

here is code in PC:
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.Ports;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
  public Form1()
  {
InitializeComponent();
  }

  private void button1_Click(object sender, EventArgs e)
  {

byte[] arrByte= new byte[96]{1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,1, 16, 32, 55, 80, 110, 140, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190, 190, 110, 90, 70, 55, 32, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1};




SerialPort port = new SerialPort("COM5", 9600, Parity.None, 8, StopBits.One);
port.ReadBufferSize = 128;
port.Open();
string read;
for (int i = 0; i < arrByte.Length; i++)
{

    port.Write(arrByte[i].ToString());
    read = port.ReadLine();
    textBox1.Text = textBox1.Text + read+", " + "\r\n";
    port.Write(",");


}
     port.Close();
  }
    }
}
 


Here us Arduino simple program:
Code:
byte incomingByte = 0; // for incoming serial data

void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}

void loop() {

// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();

// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte);
}
}
 

Thanks for answers.

best regards
malin
4  Forum 2005-2010 (read only) / Syntax & Programs / Re: Displaying time on: November 26, 2010, 07:00:51 am
I think, that i make some difrent, that I build some interface in c# and contact with arduino by serial port smiley-wink and set some verialbles like I want.


malin


5  Forum 2005-2010 (read only) / Syntax & Programs / Re: Displaying time on: November 25, 2010, 01:58:46 am
Hi everyone,


I want use this sketch to my LED Lamp, but I thinking about some keys, switchs by which one I can settings the some options, like start and stop of lighting, delay time for fade, intensity of light etc. it is possible ?


Tomek
6  Forum 2005-2010 (read only) / Development / send byte array via com on: January 24, 2011, 03:12:47 am
Hi,


I want to send via com from PC(C# application) array of byte (100 elements in array), what is the best method for do this ?

I tray do it in loop, but something is wrong becuse when i read message from arduni i take result that when I send example arrayExampe[30]=220, i receive from arduino message that he has 3 elements 2,2,0.

here is code in PC:

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.Ports;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
          
            byte[] arrByte= new byte[96]{1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,1, 16, 32, 55, 80, 110, 140, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190,190, 190, 190, 190, 190, 190, 190, 190, 190, 110, 90, 70, 55, 32, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1};




            SerialPort port = new SerialPort("COM5", 9600, Parity.None, 8, StopBits.One);
            port.ReadBufferSize = 128;
            port.Open();
            string read;
            for (int i = 0; i < arrByte.Length; i++)
            {
                
                port.Write(arrByte[i].ToString());
                read = port.ReadLine();
                textBox1.Text = textBox1.Text + read+", " + "\r\n";
                port.Write(",");
              

            }
           port.Close();
        }
    }
}

Here us Arduino simple program:
Code:
byte incomingByte = 0;      // for incoming serial data

void setup() {
      Serial.begin(9600);      // opens serial port, sets data rate to 9600 bps
}

void loop() {

      // send data only when you receive data:
      if (Serial.available() > 0) {
            // read the incoming byte:
            incomingByte = Serial.read();

            // say what you got:
            Serial.print("I received: ");
            Serial.println(incomingByte);
      }
}


Thanks for answers.

best regards
malin

7  Forum 2005-2010 (read only) / Development / convert pde to cpp on: January 21, 2011, 07:59:25 am
Hi everyone,


I want to convert the pde file to cpp and then under visual studio made some things, and then using avr-gcc and avrdude upload this software to arduino.

thanks for answers

best regards
malin
8  Forum 2005-2010 (read only) / Development / Re: parameters from PC on: November 25, 2010, 08:27:04 am
yes, that is exactly what i mean smiley


best reagds
malin
9  Forum 2005-2010 (read only) / Development / parameters from PC on: November 25, 2010, 06:22:45 am
Hi everyone,


I have sketch with some constants declaration, I want to make a something like interface on PC, in which one may I set this variables by USB.

For this task I will needing something special ? or maybe I do this on standard arduino kit ?


best regards
malin
10  Forum 2005-2010 (read only) / Development / Re: Feeding the SMD Leds on: November 23, 2010, 08:37:07 am
I want to start fading at 8AM and then after 30min have light full that mean at 8:30AM, after few hours at, 8PM start fading off and this process will be end at 8:30PM.

It is for aquarium LEDS lamp project smiley Maybe it will be easier to understanding smiley-wink


malin
11  Forum 2005-2010 (read only) / Development / Re: Feeding the SMD Leds on: November 23, 2010, 08:13:52 am
Hi, thanks for answer

By fade I mean that is slowly turning off the leds or slowly turning on


malin
12  Forum 2005-2010 (read only) / Development / Fade the SMD Leds on: November 23, 2010, 06:41:15 am
Hi everyone,


I want to ask about that it is possible to make some software.

I have some SMD LEDS with his driver with PWM Socket, it is possible to make the software that he make fade on at 8A.M. and fade off at 8P.M ? If it is possible may I have some links to any library or other documents which one will help me ?



Thanks for your feedback
best regards
malin
Pages: [1]