luni, 1 decembrie 2014

Double Arduino with Motor driver


 



Gcode for CNC:

(Generated bottom outlines, bottom drill, )
(Unit of measure: mm)
(Metric Mode)
G21
(Absolute Coordinates)
G90
G00 X0.0000 Y0.0000
M03
G04 P3.000000
G00 Z4.0000
G00 X-56.8232 Y19.5310
G01 Z-0.3000 F127.00
G01 X-56.3610 Y19.9932 F254.00
G01 X-56.3610 Y20.6468
G01 X-56.8232 Y21.1090
G01 X-57.4847 Y21.1090
G01 X-57.7044 Y21.2358
G01 X-58.0987 Y21.6302
G01 X-58.3141 Y21.8456
G01 X-59.7959 Y21.8456
G01 X-60.4668 Y21.1746 


[...]

G82 X-6.3500 Y55.9200
G00 Z12.7000
M05
M02


vineri, 19 iulie 2013

my graduation project





No! I have not disappeared! I worked on the graduation project. Watch the video!

Thanks to all my teachers!

I'll come back soon with new examples

luni, 25 februarie 2013

Arduino i2c - Testing an Automatic Control System





2 Arduino connected through i2c
Slave Arduino reads data from phototransistor and send them to Arduino Master
This change PWM command so that the engine has run 4 rotations per second as set.

duminică, 6 ianuarie 2013

C# communicate with Arduino Part.3




I made a C # application to control two servos via USB with Arduino.




When you pull the slider bar, the value is sent to the Arduino, which represent the positions of the servo.
Each servo has his own bar.






 
C# 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;
using System.Threading;

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

        private void bara1_ValueChanged(object sender, EventArgs e)
        {
            val_bara1.Text = Convert.ToString(bara1.Value);
            transmite1();
        }





        

[... do you want the rest of the code???? ...]



        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (serialPort1.IsOpen) serialPort1.Close();
        }
    }
}


Arduino code :


#include <Servo.h> 
int v, v1, v2, v3, v4;
Servo servo1;
Servo servo2;

void setup()
{
   servo1.attach(9);
   servo2.attach(10);
   Serial.begin(9600);
}

void loop()
{
  if (Serial.available()>0)
  {

[... bla-bla-bla...]

  }
  
  delay(10);
}


C# communicate with Arduino Part.2





I tried to command a servo, via usb, from C # application to an Arduino.



When you pull the slider bar, the value is sent to the Arduino, which represent the positions of the servo.




C# code:

using System.Text;
using System.Windows.Forms;
using System.IO.Ports;

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

        private void bara_ValueChanged(object sender, EventArgs e)
        {
           

[ do you want the rest of the code???? ]


        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (serialPort1.IsOpen) serialPort1.Close();
        }
    }
}