Analogue read ==> Serial comms ==> LCD display

Good morning everybody

I’m currently working on a project where I’m using a Sharp laser rangefinder in order to get a distance measurment that I want to read out on a LCD screen some distance away.

I bought all the components from my local robotics shop, with the “promise” that you can just download apps that will address all the functionality of the Wixel.

My problem is…I can’t seem to get an app that will allow me to read an analogue sensor connected to a wixel, send the data via wireless serial to the second wixel, that is connected to an ardiono Uno, which is used to drive a 16x2 LCD screen to display the measured value.

If you use the wireless serial app, you need to have you TX and RX pins on both Wixels connected for it to work.

If you use the wireless_adc_rx app, you only get an option to send your serial data to USB and to display it on your pc.

Can somebody please give me some guidance with regards to how I should modify the code to get this working?

Ideally, it would have been first prize if there was an app like that that can be downloaded as part of the SDK suite.
Your assistance will be appreciated.

Regards
Werner

Hi, Werner.

You might consider modifying the wireless_adc_rx app and changing it to send the data to the Wixel’s UART instead of USB. You might find the Wixel SDK documentation helpful for learning how to build, load and create apps.

- Zeeshan

I’m in the same boat. I’m sorry to be so dense, but here goes:

I’m writing an app for my wife so she can tell people who knock at our front door that she is “on the phone”, or “Leave the package on the porch”, etc. The app will have “canned messages” and the capability to send ad hoc messages.

The data flow of this app is:

  • My wife sends a message from her PC connected to a Wixel (the “local” Wixel),
  • The “local” Wixel will then send the message to another Wixel (the “remote” Wixel – mounted at the front door. The “remote” Wixel is attached to an Arduino UNO with the Wixel Shield.)
  • The “remote” Wixel would send the data to its attached Arduino and the Arduino would display the various message.

It sounds like my options are to let the “remote” Wixel write to the LCD, right? Can’t the Wixel send the message to its Arduino?

Hello.

Your problem actually sounds a lot simpler than the one the original poster was asking about. You should be able to accomplish what you are trying to do with the Wixel’s wireless serial app (see the Example Use #2 near the bottom of the page for more information). I think the easiest solution is the one you describe in your data flow: connect the remote Wixel to your Arduino’s serial pins, and then have the Arduino write to the LCD based on what it receives from the Wixel. (I do not understand your last two questions.)

- Ben

Hello Ben,

First, thanks for your speedy reply. I am very impressed by the level of support you and others give on these forums. It is nice to know there are people who are passionate about their work!

About not understanding my last two questions: I get that alot – especially from my wife! :slight_smile:

So, my question now is this: Should the remote Wixel use the Serial library to write to the remote Arduino, and should the remote Arduino use the Serial library to read from the remote Wixel? I just want to be sure.

Both Wixels should be set up to use the Wireless Serial App, so you would not actually need to write any code for the Wixels. You would use USB-to-Radio mode on the Wixel that is connected to the computer and UART-to-Radio mode on the Wixel that is connected to the microcontroller. With this app in this configuration, the Wixels just become a wireless USB-to-serial adapter, so any serial bytes you send from the computer will just show up on the Arduino’s serial pins, and any serial bytes you send from the Arduino will just show up on the computer’s virtual COM port. On the Arduino side, you would probably use the Serial or SoftwareSerial library to communicate with the computer through the Wixels. Does that clear up things for you?

- Ben

Yes it does, even for an old geezer like me! Thanks so much! I’ll let y’all know how it turns out!

You guys rock!!!

Sincerely,

Keith E. Cooper