WRITING SOFTWARE OF JOYSTICK MODULE WITH ARDUINO [TUTORIAL LESSON 2] by sametceylan

View this thread on steempeak.com
· @sametceylan ·
$24.34
WRITING SOFTWARE OF JOYSTICK MODULE WITH ARDUINO [TUTORIAL LESSON 2]
Hi there,
I've shown how do we write software of robot that wun away from barrier earlier. So i will teach you how do we write sofware of joystick module.Joystick module is used in projects of robot, controll circuits and controller. There are two potentiometer for two axis.It is used with PIC except for Arduino.  
The module has 5 pin ;VCC, GND, X,Y,key. We will start to entitle pins as always. Lets start !


Herkese merhaba 
Daha önce Arduino ile engelden kaçan robot yazılımının nasıl yazıldığını göstermiştim. Şimdi de Joyistik modülünün yazılımının nasıl yazılacağını öğreteceğim. Joyistik moduller çeşitli robot projelerinde, kontrol devrelerinde ve kumandalarda kullanılır.İçerisinde 2 eksen için 2 potansiyometre bulunur. Arduino dışında PIC ile de kullanılabilir.Modulün 5 adet pini vardır;VCC, GND, X, Y, key. Herzaman olduğu gibi pinlere isim vererek başlayacağız. Hadi başlayalım!
1.AŞAMA 
Modül ile Arduino kartı arasında ki bağlantıları yapıp kontrol ettikten sonra Arduino kartımızı bilgisayarımıza takıp Arduino IDE programımızı açıyoruz. Analog 0 pinine X ekseni Analog 1 e de Y eksenini bağladık. Void Setup kısmına geçebiliriz.
![1.jpg](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512776376/hp50qz4odzvp37pgeed7.jpg)
2.AŞAMA
Burada pinMode fonksiyonlarını yazacağız. Dikkat etmemiz gereken nokta daha önce pin, giriş piniyse INPUT çıkış piniyse, OUTPUT yazıyorduk. Fakat burada ki 6 analog pini sadece giriş pini olduğu için Arduino sadece INPUT olarak algılayacaktır. O yüzden onları tanımlamaya gerek yok. Şimdi sadece serial kodunu yazacağız.
![2.jpg](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512777085/ufxrrptkqqiajxh0oi1c.jpg)
3.AŞAMA
Artık ana kodlarımı yazmaya başlayabilirim.Öncelikle A0 ve A1 pinini analog bir şekilde okuyup o veriyi elde edeceğiz.Daha önce x eksenini A0 y eksenini A1 olarak tanıttığım için bundan sonra A0 pinine x ekseni yazabilirim yada y eksenine A1 yada tam tersi.
![3.jpg](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512777720/ulidlufghqlhnsg8rysg.jpg)
4.AŞAMA
Daha sonra bu okuduğumuz analog verileri projemizde okumak için bir değişkene kaydetmemiz gerekiyor. Bu değişkenleri kaydedelim. X ekseninden gelen veriyi x_durum Y ekseninden gelen veriyi de y_durum olarak kaydedelim.
Bu işlemlerin ardından kaydettiğimiz verileri ekrana yazdırıyoruz.
![4.jpg](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512778093/bbdiammcfxz7mji0gexv.jpg)

Programın simülasyonuyla öncelikle kodlarda herhangi bir hata var mı kontrol ediyoruz. Sonra ise ekrana yazdırdığımız verileri kontrol ediyoruz.Eğer yazılımı anlattığım şekilde doğru yaptıysanız zaten bir sorun oluşmayacaktır. Yazılımımız bu şekilde artık joystik modülümüz kullanıma hazır. Kullanmak istediğimiz devreye bağlayabiliriz. İyi Çalışmalar.




<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@sametceylan/writing-software-of-joystick-module-with-arduino-tutorial-lesson-2">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , ,
properties (23)
post_id19,851,985
authorsametceylan
permlinkwriting-software-of-joystick-module-with-arduino-tutorial-lesson-2
categoryutopian-io
json_metadata"{"type": "tutorials", "repository": {"id": 919161, "watchers": 7456, "events_url": "https://api.github.com/repos/arduino/Arduino/events", "forks": 5910, "name": "Arduino", "issues_url": "https://api.github.com/repos/arduino/Arduino/issues{/number}", "trees_url": "https://api.github.com/repos/arduino/Arduino/git/trees{/sha}", "fork": false, "git_url": "git://github.com/arduino/Arduino.git", "assignees_url": "https://api.github.com/repos/arduino/Arduino/assignees{/user}", "size": 1358683, "owner": {"id": 379109, "following_url": "https://api.github.com/users/arduino/following{/other_user}", "starred_url": "https://api.github.com/users/arduino/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/arduino/subscriptions", "repos_url": "https://api.github.com/users/arduino/repos", "login": "arduino", "gists_url": "https://api.github.com/users/arduino/gists{/gist_id}", "followers_url": "https://api.github.com/users/arduino/followers", "received_events_url": "https://api.github.com/users/arduino/received_events", "type": "Organization", "avatar_url": "https://avatars3.githubusercontent.com/u/379109?v=4", "site_admin": false, "organizations_url": "https://api.github.com/users/arduino/orgs", "gravatar_id": "", "events_url": "https://api.github.com/users/arduino/events{/privacy}", "url": "https://api.github.com/users/arduino", "html_url": "https://github.com/arduino"}, "forks_count": 5910, "git_refs_url": "https://api.github.com/repos/arduino/Arduino/git/refs{/sha}", "blobs_url": "https://api.github.com/repos/arduino/Arduino/git/blobs{/sha}", "pushed_at": "2017-12-07T15:07:26Z", "watchers_count": 7456, "teams_url": "https://api.github.com/repos/arduino/Arduino/teams", "comments_url": "https://api.github.com/repos/arduino/Arduino/comments{/number}", "archived": false, "svn_url": "https://github.com/arduino/Arduino", "merges_url": "https://api.github.com/repos/arduino/Arduino/merges", "subscribers_url": "https://api.github.com/repos/arduino/Arduino/subscribers", "issue_events_url": "https://api.github.com/repos/arduino/Arduino/issues/events{/number}", "stargazers_url": "https://api.github.com/repos/arduino/Arduino/stargazers", "mirror_url": null, "statuses_url": "https://api.github.com/repos/arduino/Arduino/statuses/{sha}", "has_projects": false, "milestones_url": "https://api.github.com/repos/arduino/Arduino/milestones{/number}", "description": "open-source electronics prototyping platform", "keys_url": "https://api.github.com/repos/arduino/Arduino/keys{/key_id}", "open_issues": 922, "compare_url": "https://api.github.com/repos/arduino/Arduino/compare/{base}...{head}", "ssh_url": "git@github.com:arduino/Arduino.git", "license": {"name": "Other", "key": "other", "url": null, "spdx_id": null}, "html_url": "https://github.com/arduino/Arduino", "commits_url": "https://api.github.com/repos/arduino/Arduino/commits{/sha}", "open_issues_count": 922, "stargazers_count": 7456, "branches_url": "https://api.github.com/repos/arduino/Arduino/branches{/branch}", "full_name": "arduino/Arduino", "forks_url": "https://api.github.com/repos/arduino/Arduino/forks", "score": 125.39968, "deployments_url": "https://api.github.com/repos/arduino/Arduino/deployments", "contributors_url": "https://api.github.com/repos/arduino/Arduino/contributors", "homepage": "http://www.arduino.cc/", "contents_url": "https://api.github.com/repos/arduino/Arduino/contents/{+path}", "has_downloads": true, "collaborators_url": "https://api.github.com/repos/arduino/Arduino/collaborators{/collaborator}", "created_at": "2010-09-17T19:10:36Z", "git_commits_url": "https://api.github.com/repos/arduino/Arduino/git/commits{/sha}", "releases_url": "https://api.github.com/repos/arduino/Arduino/releases{/id}", "private": false, "pulls_url": "https://api.github.com/repos/arduino/Arduino/pulls{/number}", "git_tags_url": "https://api.github.com/repos/arduino/Arduino/git/tags{/sha}", "notifications_url": "https://api.github.com/repos/arduino/Arduino/notifications{?since,all,participating}", "language": "C", "updated_at": "2017-12-08T11:41:36Z", "has_wiki": true, "downloads_url": "https://api.github.com/repos/arduino/Arduino/downloads", "hooks_url": "https://api.github.com/repos/arduino/Arduino/hooks", "languages_url": "https://api.github.com/repos/arduino/Arduino/languages", "default_branch": "master", "labels_url": "https://api.github.com/repos/arduino/Arduino/labels{/name}", "url": "https://api.github.com/repos/arduino/Arduino", "has_pages": false, "tags_url": "https://api.github.com/repos/arduino/Arduino/tags", "clone_url": "https://github.com/arduino/Arduino.git", "archive_url": "https://api.github.com/repos/arduino/Arduino/{archive_format}{/ref}", "has_issues": true, "issue_comment_url": "https://api.github.com/repos/arduino/Arduino/issues/comments{/number}", "subscription_url": "https://api.github.com/repos/arduino/Arduino/subscription"}, "pullRequests": [], "format": "markdown", "image": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512776376/hp50qz4odzvp37pgeed7.jpg"], "links": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512776376/hp50qz4odzvp37pgeed7.jpg", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1512777085/ufxrrptkqqiajxh0oi1c.jpg", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1512777720/ulidlufghqlhnsg8rysg.jpg", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1512778093/bbdiammcfxz7mji0gexv.jpg"], "app": "utopian/1.0.0", "platform": "github", "tags": ["utopian-io", "utoian-io", "tr", "tutorial"], "community": "utopian"}"
created2017-12-09 00:12:15
last_update2017-12-09 00:12:15
depth0
children3
net_rshares7,122,663,356,579
last_payout2017-12-16 00:12:15
cashout_time1969-12-31 23:59:59
total_payout_value17.574 SBD
curator_payout_value6.761 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2,993
author_reputation13,318,166,635,716
root_title"WRITING SOFTWARE OF JOYSTICK MODULE WITH ARDUINO [TUTORIAL LESSON 2]"
beneficiaries
0.
accountarie.steem
weight43
1.
accountcnts
weight10
2.
accountfreedom
weight658
3.
accountknowledges
weight48
4.
accountnetuoso
weight6
5.
accounttransisto
weight70
6.
accountutopian-io
weight536
7.
accountxeldal
weight27
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (11)
@damla ·
Thank you for the contribution. It has been approved.

- Next time you can use the command < c o d e > (without the brackets) to insert code examples. That is better than images of the code for people who would like to copy it for practicing purposes.


You can contact us on [Discord](https://discord.gg/UCvqCsx).
**[[utopian-moderator]](https://utopian.io/moderators)**
properties (22)
post_id19,945,938
authordamla
permlinkre-sametceylan-writing-software-of-joystick-module-with-arduino-tutorial-lesson-2-20171209t224449276z
categoryutopian-io
json_metadata"{"app": "busy/1.0.0", "community": "busy", "tags": ["utopian-io"]}"
created2017-12-09 22:45:24
last_update2017-12-09 22:45:24
depth1
children1
net_rshares0
last_payout2017-12-16 22:45:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length371
author_reputation13,839,203,997,366
root_title"WRITING SOFTWARE OF JOYSTICK MODULE WITH ARDUINO [TUTORIAL LESSON 2]"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@sametceylan ·
You are right. Thanks for return. I'm going to consider your comment.
properties (22)
post_id19,950,078
authorsametceylan
permlinkre-damla-re-sametceylan-writing-software-of-joystick-module-with-arduino-tutorial-lesson-2-20171209t235537970z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "tags": ["utopian-io"]}"
created2017-12-09 23:54:06
last_update2017-12-09 23:54:06
depth2
children0
net_rshares0
last_payout2017-12-16 23:54:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length69
author_reputation13,318,166,635,716
root_title"WRITING SOFTWARE OF JOYSTICK MODULE WITH ARDUINO [TUTORIAL LESSON 2]"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
### Hey @sametceylan I am @utopian-io. I have just upvoted you!
#### Achievements
- You have less than 500 followers. Just gave you a gift to help you succeed!
- Seems like you contribute quite often. AMAZING!
#### Suggestions
- Contribute more often to get higher and higher rewards. I wish to see you often!
- Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!
#### Get Noticed!
- Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
properties (22)
post_id19,971,924
authorutopian-io
permlinkre-sametceylan-writing-software-of-joystick-module-with-arduino-tutorial-lesson-2-20171210t063106198z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2017-12-10 06:31:06
last_update2017-12-10 06:31:06
depth1
children0
net_rshares0
last_payout2017-12-17 06:31:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,509
author_reputation152,913,012,544,965
root_title"WRITING SOFTWARE OF JOYSTICK MODULE WITH ARDUINO [TUTORIAL LESSON 2]"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000