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
Ad icon
Singapore V2Ray VPN for Tunneling
hu KANNA
Updated:
Yesterday at 9:03 PM
Plan your Crypto & Forex entries before you take the trade
romeshnonis
Updated:
Yesterday at 3:20 AM
RHCSA, RHCE, AWS, Docker, Kubernetes Training
Sanjeewani95
Updated:
Sep 8, 2026
🛡️ Kaspersky Antivirus – 1 Year / 1 Device | Rs. 2,300 | Only 9 Left
KSPathirana
Updated:
Sep 7, 2026
Ad icon
Professional CCTV Installation Service
Techguy231
Updated:
Sep 6, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Arduino serial communication HELP
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="_A_I_I_" data-source="post: 20805814" data-attributes="member: 499503"><p>මේකේ arduino එක මොකටවත් connect කරලා නෑ නේද. එහෙමනම් serial.write කරලා ඒක serial.read කලාට හරියන්නේ නෑ. serial.write එකෙන් TX buffer එකට write වෙන්නේ. serial.read() එකෙන් RX buffer එකෙන් read වෙන්නේ. මට පේන විදිහට Serial එක ඕනේ නෑ. key එක read කරන char එක use කලාම ඇති.</p><p>[CODE]</p><p>#include <Keypad.h></p><p></p><p>const byte ROWS = 4;</p><p>const byte COLS = 3;</p><p>char keys[ROWS][COLS] = {</p><p> {'1','2','3'},</p><p> {'4','5','6'},</p><p> {'7','8','9'},</p><p> {'#','0','*'}</p><p>};</p><p>byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad</p><p>byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad</p><p></p><p>Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );</p><p></p><p>void setup(){</p><p> </p><p>}</p><p></p><p>void loop(){</p><p> char key = keypad.getKey();</p><p></p><p> if(key){</p><p> if(key=='1'){</p><p> digitalWrite(10,HIGH); //led light up</p><p> }else{</p><p> digitalWrite(10,LOW);</p><p> }</p><p> }</p><p>}</p><p></p><p></p><p></p><p></p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="_A_I_I_, post: 20805814, member: 499503"] මේකේ arduino එක මොකටවත් connect කරලා නෑ නේද. එහෙමනම් serial.write කරලා ඒක serial.read කලාට හරියන්නේ නෑ. serial.write එකෙන් TX buffer එකට write වෙන්නේ. serial.read() එකෙන් RX buffer එකෙන් read වෙන්නේ. මට පේන විදිහට Serial එක ඕනේ නෑ. key එක read කරන char එක use කලාම ඇති. [CODE] #include <Keypad.h> const byte ROWS = 4; const byte COLS = 3; char keys[ROWS][COLS] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'#','0','*'} }; byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); void setup(){ } void loop(){ char key = keypad.getKey(); if(key){ if(key=='1'){ digitalWrite(10,HIGH); //led light up }else{ digitalWrite(10,LOW); } } } [/CODE] [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom