DreamRobotics.com Açılmıştır..

Posted by : Bora Ciner | 3 Haziran 2009 Çarşamba | Published in

www.DreamRobotics.com 03.06.2009 tarihinden itibaren yayınına başlamıştır.

Siteye girmek için buraya tıklayın. veya www.dreamrobotics.com yazın..

 

image image

Projistor’09 Teknik Proje Yarışması 3. ‘lük ödülü

Posted by : Bora Ciner | 20 Mayıs 2009 Çarşamba | Published in

projistor0001

Projistor Resimleri ( Pictures )

Posted by : Bora Ciner | | Published in

DSC04174

DSC04180 DSC04172

DSC04171 SP_A0122

SP_A0126

SP_A0135

SP_A0138

SP_A0137

Wiiremote – Visual Studio.net Connection (English)

Posted by : Bora Ciner | 19 Mayıs 2009 Salı | Published in

The Wii Remote, sometimes unofficially nicknamed "Wiimote", is the primary controller for Nintendo's Wii console. A main feature of the Wii Remote is its motion sensing capability, which allows the user to interact with and manipulate items on screen via movement and pointing through the use of accelerometer and optical sensor technology. Another feature is its expandability through the use of attachments.

Firstly we’re installing bluesoleil software from here ,then we press 1 and 2 buttons of wii remote at the same time, when we see the leds’ being blinking we connect to Wiiremote from bluesoleil program. It should see the device as an HID ( Human interface device) .

Now, We’re connected to Wiiremote from our pc via bluetooth connection.

Secondly, We’re configuring VS.Net with doing 3 steps.

1-) We select Project->Add Referance from our VS.Net 2008 project, in the Browse tab we select WiimoteLib.dll and add this .dll file to our project as an referance.

2-) In the begining of Form1.cs file we add this line in order to import the wiiremote library.

using WiimoteLib;

3-)The upper level of the public Form1() we add this line to create wiimote object

Wiimote wiimote1 = new Wiimote();

4-)Now we read the angular values of the wiiremote, put a button in the form and add these codes in that button.

wiimote1.Connect();
wiimote1.SetReportType(InputReport.IRAccel, true);
float xAccel = wiimote1.WiimoteState.AccelState.Values.X;
//acceleration value of the x axis
float yAccel = wiimote1.WiimoteState.AccelState.Values.Y;//y ekseninin ivmesel değeri
float zAccel = wiimote1.WiimoteState.AccelState.Values.Z;

now we have the values which we took from the wiiremote device.Finally , we want to see these on a label.

put a label on the form and append this line in the previous button.

label1.Text = xAccel.ToString();

 

When we press the button, it reads the values and display them on the label.

3. Projistor Posteri

Posted by : Bora Ciner | | Published in

vietnam

WiiRemote – Robot Hareket Kalibrasyon Ayarı

Posted by : Bora Ciner | | Published in

Oluşturmuş olduğumuz Form’a Wiimote kütüphanesini ve bağlantı kodlarını eklemiştik, şimdi de robot için hareketleri nasıl kalibre edip mikrodenetleyiciye gönderecğimizi anlayalım.

Öncelikle Wiimote change state fonksiyonunu kullamayacağız çünkü wiimote’daki değişim MCU-PC iletişim hızından daha hızlı olabilir, eğer böyle bir şey olursa da program hata verir. Bu yüzden bir Timer ekleyip hızını 100 (0.1s) ayarlayalım. içine de şu kodları ekleyelim

Uygulamadaki Kalibrasyon 0.2’dir

bool button_B = wiimote1.WiimoteState.ButtonState.B;    /* A butonunun degeri*/
float xAccel = wiimote1.WiimoteState.AccelState.Values.X;  /* X ekseni ivmesel değişkeni */
float yAccel = wiimote1.WiimoteState.AccelState.Values.Y;
float zAccel = wiimote1.WiimoteState.AccelState.Values.Z;
label23.Text = xAccel.ToString();
label29.Text = yAccel.ToString();
label30.Text = zAccel.ToString();

if (button_B == true)
{
    label24.Text = "Button B Basili";
    label33.Text = "Dur";
    // if (port.IsOpen) port.WriteLine("5");
    //else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);

    label35.Text = "Ates Ediliyor";
    if (port.IsOpen) port.WriteLine("7");
    else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);

}
else
{
    label24.Text = "Button B Basili Degil";
    label35.Text = "Ates Edilmiyor";

    if (yAccel > 0.2)
    {
        label33.Text = "Asagi";
        if (port.IsOpen) port.WriteLine("4");
        else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    else
    {
        if (yAccel < -0.2)
        {
            label33.Text = "Yukari";
            if (port.IsOpen) port.WriteLine("3");
            else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
        else
        {
            if (xAccel > 0.2)
            {
                label33.Text = "Saga";
                if (port.IsOpen) port.WriteLine("2");
                else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);

            }
            else
            {
                if (xAccel < -0.2)
                {
                    label33.Text = "Sola";
                    if (port.IsOpen) port.WriteLine("1");
                    else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);

                }
                else
                {
                    label33.Text = "Dur";
                    if (port.IsOpen) port.WriteLine("5");
                    else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);

                }
            }
        }
    }
}

Bu kodlar sayesinde hem ekranda robotun hangi komutu yerine getirdiğini görebiliyoruz hemde aynı anda o komutları göndererek robotu izleyebiliyoruz.

Not: Bu uygulamada form’a “port” adında bir serial port objesi eklenmiştir

Projistor Posterleri

Posted by : Bora Ciner | 15 Mayıs 2009 Cuma | Published in


Klavye'ye İnput Göndermek C++.Net Visual Studio

Posted by : Bora Ciner | 12 Mayıs 2009 Salı | Published in


Bilgisayarımıza sanki klavyeden input yapılıyormuş gibi keybd_event() 'i nasıl kullanacağımızı anlatacağım. Bu satırları programda kullanarak wii mote veya başka aygıtlara kontrol yazılımları oluşturarak değişik programlara ( google earth , winamp vb.. ) erişim sağlayabiliriz.




1-) öncelikle using System.Runtime.InteropServices;
satırını Form1.cs dosyamızın en üst kısmına koyuyoruz.
2-) Form1 () fonksiyonunun hemen üst kısmına şu kodları ekliyoruz.


//import mouse_event function from user32.dll
//[DllImport("user32.dll")]
//static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, int dwExtraInfo);
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, int dwExtraInfo);
//import keybd_event function from user32.dll
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void keybd_event(byte bVk, byte bScan, long dwFlags, long dwExtraInfo);
//import GetCursorPos function from user32.dll
[DllImport("user32.dll")]
private static extern bool GetCursorPos(ref Point lpPoint);
//import SetCursorPos function from user32.dll
[DllImport("user32.dll")]
public static extern int SetCursorPos(int x, int y);
//struct Point
//{
// public int x;
// public int y;
//}
//declare consts for mouse messages
public const int MOUSEEVENTF_LEFTDOWN = 0x02;
public const int MOUSEEVENTF_LEFTUP = 0x04;
public const int MOUSEEVENTF_RIGHTDOWN = 0x08;
public const int MOUSEEVENTF_RIGHTUP = 0x10;
public const int MOUSEEVENTF_MIDDLEDOWN = 0x20;
public const int MOUSEEVENTF_MIDDLEUP = 0x40;
public const int MOUSEEVENTF_MOVE = 0x01; //Relative move
public const int MOUSEEVENTF_MOVE_ABS = 0x8001; //Absolute move
public const int KEYEVENTF_EXTENDEDKEY = 0x01;
public const int KEYEVENTF_KEYDOWN = 0x00;
public const int KEYEVENTF_KEYUP = 0x02;
private int ScrWidth = 1024;
private int ScrHeight = 786;
private int ScrX0 = 0;
private int ScrY0 = 0;
private double Timer1_m = 0;
private double Timer1_s = 0;
private double Timer1_count = 0;
private double Timer2_m = 0;
private double Timer2_s = 0;
private double Timer2_count = 0;
private double Timer3_m = 0;
private double Timer3_s = 0;
private double Timer3_count = 0;
private double Timer4_m = 0;
private double Timer4_s = 0;
private double Timer4_count = 0;
private bool LED1 = false;
private bool LED2 = false;
private bool LED3 = false;
private bool LED4 = false;
private bool F5_next = true;
private bool T1_paused = false;
private bool T2_paused = false;
private bool T3_paused = false;
private bool T4_paused = false;
private bool T1_started = false;
private bool T2_started = false;
private bool T3_started = false;
private bool T4_started = false;
private double IR_margin = 0.05;
public bool Connected = false;
private string DecSym = ".";

3-) şimdi de bunu test etmek için bir timer açıp event'ini şu şekilde kodlayalım.


int klavyesay = 1;
private void klavye_Tick(object sender, EventArgs e)
{
klavyesay = klavyesay * -1;
if(klavyesay==1)
keybd_event((byte)Keys.G, 0, KEYEVENTF_KEYDOWN, 0);
keybd_event((byte)Keys.B, 0, KEYEVENTF_KEYUP, 0);
if(klavyesay==-1)
keybd_event((byte)Keys.B, 0, KEYEVENTF_KEYDOWN, 0);
keybd_event((byte)Keys.G, 0, KEYEVENTF_KEYUP, 0);
}


Programımız run edildiğinde her timer_tick 'te sırayla b veya g harflerine basıp çekecektir. Hangi tuşun basılmasını ayarlamak için Keys. kısmından sonra gelen yeri istediğimiz gibi kodlayabiliriz.

Wii-Remote - Visual Studio.Net Bağlantısı

Posted by : Bora Ciner | 10 Mayıs 2009 Pazar | Published in

Wii-Remote


Wii Remote, halk arasında Wiimote ismiyle de bilinen, Nintendo Wii konsolunun oyun kumandasıdır. Bu kumandanın en temel özelliği hareket algılayıcı sensörlerinin bulunmasıdır. Bu sayede oyuncu ekrandaki uygulamalarla etkileşim içindedir. Wii remote hareket algılama için ivmeölçer ve optik sensör teknolojisini kullanmaktadır. Bilgisayarla bağlantısını bluetooth yoluyla kuracağız.

Wii remote aygıtının 1 ve 2 tuşlarına aynı anda bastığımızda ışıkları yanıp sönmeye başlayacak , bu sırada bluetooth aygıtımızdan bilgisayarımıza HID(Human Interface Driver) olarak tanıtacağız. daha sonra;

http://www.codeplex.com/WiimoteLib adresine girip wiimotelib.dll nin son versiyonunu indiriyoruz ve şu adımları uyguluyoruz.


1-) VS.Net 2008 projemizden Project->Add Referance 'ı seçip, Browse tab'ından WiimoteLib.dll yi seçip bu dll dosyasını projemize referans olarak ekliyoruz.
2-) Form1.cs Dosyasının en üst kısmına using WiimoteLib; satırını ekliyoruz
3-)public Form1() constructor fonksiyonunun üst classında
Wiimote wiimote1 = new Wiimote();
kodlarıyla wiimote1 nesnesini yaratıyoruz.
4-) şimdi float değişkenlerle wii-remote'un açısal değerlerini okuyacağız.Bir buton koyup bunun içine şu kodları yazın
wiimote1.Connect();
wiimote1.SetReportType(InputReport.IRAccel, true);

float xAccel = wiimote1.WiimoteState.AccelState.Values.X;
//x ekseninin ivmesel değeri
float yAccel = wiimote1.WiimoteState.AccelState.Values.Y;
//y ekseninin ivmesel değeri
float zAccel = wiimote1.WiimoteState.AccelState.Values.Z;
//z ekseninin ivmesel değeri


böylece aletten aldığımız değerleri değişkenlere atamış bulunmaktayız.

5-) Form'a Label ekleyip
label1.Text = xAccel.ToString();
koduyla o anki değeri ekranda görebiliriz.

Robot Silah Açıklamalar:

Posted by : Bora Ciner | | Published in

Kullanılan Malzemeler:

Wii-remote uzaktan kumandası
Örnek Silah
12 V akü
2x L293D entegresi
7805 Voltaj Regulatorü
BasicStamp II Sx Oem Mikrodenetleyicisi
12V Röle
Spiral Telefon kabloları ve kutuları
2x Redüktör
2x DC Motor (Redüktörlü)
2 eksenli platform
Kundak sabitleyici Demir
------------------------------------------------
Geliştirme Ortamları : VS .Net 2008 , PBasic
Yardımcı Kütüphaneler : SkinCrafter 3.3 , WiimoteLib

Geliştirmiş olduğum VS C++.Net programımla wii-remote kumandasına bluetooth yolu ile bağlanıp 3d konum - açı bilgilerini anlık olarak bilgisayara aktarıyor , bu verileri kullanarak gerekli komutları mikrodenetleyiciye aktarıyorum,komutları alan mikrodenetleyici ise pin çıkışlarını ayarlayıp motor sürücü entegrelerine gerekli çıkışları veriyor ve DC motorlar hareketleniyor.
Programın Görünümü Bir Sonraki Başlıktadır.

SkinCrafter Özelliği:

Skincrafter kütüphanesini kullanarak programımızın görünüşünü 100'e yakın farklı şekilde ayarlayabiliriz, bunun için herhangi bir warez sitesinden skincrafter'ın tam versiyon kütüphanesini indirdikten sonra ;
1-) VS.Net 2008 projemizden Project->Add Referance 'ı seçip, Browse tab'ından skincrafter_.net2.0_vs2008.dll yi seçip bu dll dosyasını projemize referans olarak ekliyoruz.
2-) Form1.Designer.cs dosyasında; (ITALIK OLAN)
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.skinCrafter1 = new DMSoft.SkinCrafter();
.
.
.
}

Son satırlarına doğru da şu satırı ekliyoruz;(ITALIK OLAN)

private System.Windows.Forms.OpenFileDialog openFileDialog1;
private DMSoft.SkinCrafter skinCrafter1;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label6;
.
.
.
.
.


3-) Projemizin Constructor 'ı olan Form1 in içine şu kodları ekliyoruz.(ITALIK OLAN)Public Form1(){
openFileDialog1.ShowDialog();
skinCrafter1.LoadSkinFromFile(openFileDialog1.FileName);
skinCrafter1.ApplySkin();
}
Böylece program açılışta open file dialog penceresiyle hangi skin (.skf) dosyasını seçeceğimizi soracak.


Robot Silah Görünüm

Posted by : Bora Ciner | 8 Mayıs 2009 Cuma | Published in












Robot Kol Projesi -Robotic Arm Project

Posted by : Bora Ciner | | Published in











Ekran Görüntüsü










Mikrodenetleyici Görünümü.


Açıklamalar:

Modules
*Robotic Arm x1
*Motor Control Ics. x3
*12V Relays x10
*Programmed Microcontroller ( Basicstamp II sx oem ) x1
*RS232 to USB Converter x1






What is Robotic Arm?
A robotic arm is a robot manipulator, usually programmable, with similar functions to a human arm.



Motor Control Circuits
L293D is a dual H-Bridge motor driver, So with one IC we can interface two DC motors which can be controlled in both clockwise and counter clockwise direction and if you have motor with fix direction of motion the you can make use of all the four I/Os to connect up to four DC motors. L293D has output current of 600mA and peak output current of 1.2A per channel. Moreover for protection of circuit from back EMF ouput diodes are included within the IC. The output supply (VCC2) has a wide range from 4.5V to 36V, which has made L293D a best choice for DC motor driver.


What is Relay?
A relay is an electrical switch that opens and closes under the control of another electrical circuit. In the original form, the switch is operated by an electromagnet to open or close one or many sets of contacts.






The control program which is written with C++.Net provide us to connect to the microcontroller and let us send specific characters to MCU.
Microcontroller recieves these characters then decides which pin will be set or reset. According to these output pins. Voltage control circuits pull/push relays (let DC Motors work) According to the list of commands ,robotic arm can start to move orderly.