Im trying to send an ASCII data string over serial by just pressing a wired push button. I have a laser range finder module that only has a RS422 data line but want an external pushbutton. What would be the best way to go about this. I will have a beaglebone black receiving the return data. I am new to BBB and any type of programing in general. I have searched the web but cant seem to find what im looking for. Im sure it simple and im thinking way to far into it. Any help or link that would point me in the right direction would be greatly appreciated.
comanche9:
Im trying to send an ASCII data string over serial by just pressing a wired push button. I have a laser range finder module that only has a RS422 data line but want an external pushbutton.
Errrrr, what do you want to do ? Send an ASCII message from the BB to the rangefinder when you push a button ? Or what ??
Yes, I have a BBB on its way and have searched the net looking for an example or explination on how to achive this with no luck. Is it so simple it need not explained? Like I said, I’m by no means a programr or code writer but figured I would dive in and learn along the way.
Mac asked you two questions. Either “this” or “that?”
Your answer was “yes.”
You see why we’re confused?
This is ... what ?comanche9:
… explination on how to achive this …
And if I hear “second base” … I’m outta here ! :mrgreen:
Sorry guys let me tey to clear it up. I have a range finding module that only accepts ASCII data string to fire the laser and have it send its measured distance over serial back to the BBB. It uses RS422 for this. I have got the 422 to 232 adapter and tested in terminal on a PC and all works fine. My enstate is to have a BBB gatering the data from the range finder and displaying it on the BBB screen. I want to send the command to fire the laser with the push of a tactile button that will be through hole mounted on the housing the BBB will be inside of.
You will need to write a program for the BBB that will monitor the pushbutton and what that is pressed, send the command and read the result. What development system and language will you be using for the program?
Probably easiest to do it in Bonescript. Here’s a link to a nodejs serial comm tutorial: https://itp.nyu.edu/physcomp/labs/labs- … rt_Library
To read the pushbutton, use digitalRead() function.