Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Handmade Character Soft Toys
anil1961
Updated:
Yesterday at 2:11 PM
Bodim.lk out now !
Manoj Suranga Bandara
Updated:
Sunday at 3:05 AM
Power Lifting Lever Belt
SkullVamp
Updated:
Jun 13, 2026
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Jun 13, 2026
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Jun 11, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Arduino HC06 Bluetooth Module
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="isurutmv" data-source="post: 22781430" data-attributes="member: 470006"><p><span style="font-size: 18px">Mcn mama Arduino Nano board ekath ekka HC06 Bluetooth Module ekak connect arala thiyenawa module ekata 5v aran thiyenne board ekenmayi mama board ekata USB walin power eka dunnama module eka wada but board ekata wenama power eka dunnama module eka wada naha mokakda mcn mekata karanna oona </span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">thawa deyak mama board ekata upload karapu code eka pahalin danawa ee code eke widihatama phone eken 1,2,3 kiyana values pass wenakota functions tika hodata wada but 4 kiyana value eka pass una gaman bluetooth module eka disconnect wenawa</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[PHP]</span></p><p><span style="font-size: 18px">//MakewithREX Bot controller android app</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">boolean goesForward = false;</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">char getstr;</span></p><p><span style="font-size: 18px">const int LeftMotorForward = 2;</span></p><p><span style="font-size: 18px">const int LeftMotorBackward = 3;</span></p><p><span style="font-size: 18px">const int RightMotorForward = 4;</span></p><p><span style="font-size: 18px">const int RightMotorBackward = 5;</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">void _mForward()</span></p><p><span style="font-size: 18px">{ </span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorForward, HIGH);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorForward, HIGH);</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorBackward, LOW);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorBackward, LOW);</span></p><p><span style="font-size: 18px"> Serial.println("go forward!");</span></p><p><span style="font-size: 18px">}</span></p><p><span style="font-size: 18px">void _mBack()</span></p><p><span style="font-size: 18px">{</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorBackward, HIGH);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorBackward, HIGH);</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorForward, LOW);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorForward, LOW);</span></p><p><span style="font-size: 18px"> Serial.println("go back!");</span></p><p><span style="font-size: 18px">}</span></p><p><span style="font-size: 18px">void _mleft()</span></p><p><span style="font-size: 18px">{</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorBackward, LOW); // did change to move only ryt motor forward</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorForward, HIGH);</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorForward, LOW);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorBackward, LOW);</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> Serial.println("go left!");</span></p><p><span style="font-size: 18px">}</span></p><p><span style="font-size: 18px">void _mright()</span></p><p><span style="font-size: 18px">{</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorForward, HIGH);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorBackward, LOW); // did change to move only left motor forward</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorBackward, LOW);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorForward, LOW);</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px">}</span></p><p><span style="font-size: 18px">void _mStop()</span></p><p><span style="font-size: 18px">{</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorForward, LOW);</span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorForward, LOW);</span></p><p><span style="font-size: 18px"> digitalWrite(RightMotorBackward, LOW);</span></p><p><span style="font-size: 18px"> digitalWrite(LeftMotorBackward, LOW);</span></p><p><span style="font-size: 18px"> Serial.println("Stop!");</span></p><p><span style="font-size: 18px">}</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">void setup()</span></p><p><span style="font-size: 18px">{ </span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> Serial.begin(9600);</span></p><p><span style="font-size: 18px"> pinMode(RightMotorForward, OUTPUT);</span></p><p><span style="font-size: 18px"> pinMode(LeftMotorForward, OUTPUT);</span></p><p><span style="font-size: 18px"> pinMode(LeftMotorBackward, OUTPUT);</span></p><p><span style="font-size: 18px"> pinMode(RightMotorBackward, OUTPUT);</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"> delay(100);</span></p><p><span style="font-size: 18px">}</span></p><p><span style="font-size: 18px">void loop()</span></p><p><span style="font-size: 18px"> { </span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"> if(Serial.available()){ </span></p><p><span style="font-size: 18px"> getstr=Serial.read();</span></p><p> <span style="font-size: 18px">if(getstr=='1')</span></p><p><span style="font-size: 18px"> {</span></p><p><span style="font-size: 18px"> _mForward();</span></p><p><span style="font-size: 18px"> }</span></p><p><span style="font-size: 18px"> else if(getstr=='2')</span></p><p><span style="font-size: 18px"> {</span></p><p><span style="font-size: 18px"> _mBack();</span></p><p><span style="font-size: 18px"> delay(200);</span></p><p><span style="font-size: 18px"> }</span></p><p><span style="font-size: 18px"> else if(getstr=='4')// according to my robot. otherwise L</span></p><p><span style="font-size: 18px"> {</span></p><p><span style="font-size: 18px"> _mleft();</span></p><p><span style="font-size: 18px"> delay(200);</span></p><p><span style="font-size: 18px"> }</span></p><p><span style="font-size: 18px"> else if(getstr=='3') // according to my robot. otherwise R</span></p><p><span style="font-size: 18px"> {</span></p><p><span style="font-size: 18px"> _mright();</span></p><p><span style="font-size: 18px"> delay(200);</span></p><p><span style="font-size: 18px"> }</span></p><p><span style="font-size: 18px"> else if(getstr=='X')</span></p><p><span style="font-size: 18px"> {</span></p><p><span style="font-size: 18px"> _mStop(); </span></p><p><span style="font-size: 18px"> }</span></p><p><span style="font-size: 18px"> }</span></p><p><span style="font-size: 18px"> </span></p><p><span style="font-size: 18px">}</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[/PHP]danna kiyana kenek help ekak diyallako <img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" /><img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" /><img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" /></span></p><p><span style="font-size: 18px"></span></p></blockquote><p></p>
[QUOTE="isurutmv, post: 22781430, member: 470006"] [SIZE=5]Mcn mama Arduino Nano board ekath ekka HC06 Bluetooth Module ekak connect arala thiyenawa module ekata 5v aran thiyenne board ekenmayi mama board ekata USB walin power eka dunnama module eka wada but board ekata wenama power eka dunnama module eka wada naha mokakda mcn mekata karanna oona thawa deyak mama board ekata upload karapu code eka pahalin danawa ee code eke widihatama phone eken 1,2,3 kiyana values pass wenakota functions tika hodata wada but 4 kiyana value eka pass una gaman bluetooth module eka disconnect wenawa [PHP] //MakewithREX Bot controller android app boolean goesForward = false; char getstr; const int LeftMotorForward = 2; const int LeftMotorBackward = 3; const int RightMotorForward = 4; const int RightMotorBackward = 5; void _mForward() { digitalWrite(LeftMotorForward, HIGH); digitalWrite(RightMotorForward, HIGH); digitalWrite(LeftMotorBackward, LOW); digitalWrite(RightMotorBackward, LOW); Serial.println("go forward!"); } void _mBack() { digitalWrite(LeftMotorBackward, HIGH); digitalWrite(RightMotorBackward, HIGH); digitalWrite(LeftMotorForward, LOW); digitalWrite(RightMotorForward, LOW); Serial.println("go back!"); } void _mleft() { digitalWrite(LeftMotorBackward, LOW); // did change to move only ryt motor forward digitalWrite(RightMotorForward, HIGH); digitalWrite(LeftMotorForward, LOW); digitalWrite(RightMotorBackward, LOW); Serial.println("go left!"); } void _mright() { digitalWrite(LeftMotorForward, HIGH); digitalWrite(RightMotorBackward, LOW); // did change to move only left motor forward digitalWrite(LeftMotorBackward, LOW); digitalWrite(RightMotorForward, LOW); } void _mStop() { digitalWrite(RightMotorForward, LOW); digitalWrite(LeftMotorForward, LOW); digitalWrite(RightMotorBackward, LOW); digitalWrite(LeftMotorBackward, LOW); Serial.println("Stop!"); } void setup() { Serial.begin(9600); pinMode(RightMotorForward, OUTPUT); pinMode(LeftMotorForward, OUTPUT); pinMode(LeftMotorBackward, OUTPUT); pinMode(RightMotorBackward, OUTPUT); delay(100); } void loop() { if(Serial.available()){ getstr=Serial.read(); if(getstr=='1') { _mForward(); } else if(getstr=='2') { _mBack(); delay(200); } else if(getstr=='4')// according to my robot. otherwise L { _mleft(); delay(200); } else if(getstr=='3') // according to my robot. otherwise R { _mright(); delay(200); } else if(getstr=='X') { _mStop(); } } } [/PHP]danna kiyana kenek help ekak diyallako :(:(:( [/SIZE] [/QUOTE]
Insert quotes…
Verification
Nawa warak dahaya keeyada? (Namaya wadi kireema dahaya)
Post reply
Top
Bottom