Bidirectional communication. Ultrasonic sensor and oled display

Hi! I'm trying to do a project. A bidirectional wireless communication between an ultrasonic sensor and an oled display.
transmitter: arduino nano, nrf24l01 and ultrasonic sensor/ distance measuring sensor
receiver: arduino nano, nrf24l01, oled display and buttom/ switch for on/off

I don't know how to make the connection between sensor and oled. how to make the OLED show me what my sensor is measuring?

I don't know how to writing the code.
can anyone help me? Please, i really need help. :cry: :cry: :cry:

you need two Arduinos. One driving the distance acquisition and sending the data using your nrf24l01(or HC12 or other radio type, depends on your constraints) another remote arduino listening to the radio and managing the screen. This is not a beginner project.

if you don't want to learn, this seems a great ask for the Jobs and Paid Consultancy forum, make sure you mention your budget.

if you want to learn, start with simpler projects to understand the language and the Arduino ecosystem and work your way up to what you want to achieve. You'll find in the forum some examples on how to establish the nrf24l01 communication and share data.

If you show us your sketch and the errors you get when you try to upload the sketch we can probably help you solve the errors.

Can you draw a block diagram to show the seperate elements of the project?

Then do you have sketches that demostrate each part working on its own?

EG
can your receiver nano show text on the display?
is your sender reading distances (use the serial.print to show the results)?

This is top down design with stepwise refinement - and testing each seperate stage.

In what way does it not work?

I would recommend simplifying your code for debugging purposes. Replace printing LCD code with printing to Serial code and Replace The Ulstrasomic sensor code with a fixed value

You are way over complicating this and skipping required steps. A complicated thing is just a lot of simple things. Break your project down and focus on 1 simple thing. Make it as simple as possible using only known entities. Once 1 thing works then you do the same with the next thing. Then you add 2 working things together etc. you should use an iterative approach with multiple, well named sketches. Bugs should only exist between your last working sketch and your current active sketch.

If you do everything at once you will fail. Piling multiple non functioning and unknown variables into one project and coding all together means there will be many bugs, hidden anywhere, and no easy debugging process.

Schematics and data sheets are useful. Most things will have working test codes online.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.