hi there, i recently started working with arduino and I was trying to build a car which i could control by a keyboard, so in this case i would be using a single motor, a servo, an arduino and raspberry pi. My question is how do i make arduino follow raspberry pi commands per example if i press the letter "d" it rorates 45º of the servo. And another question is how would i program the servo to turn softly and not blunt.
I hope someone can help me as fast as possible because I really need the help to a school project
Best regards,
Gonçalo
Hi Goncalo,
somehow in the past two weeks a lot of first posts are in the style like your posting.
"can somebody do my homework for me"
What you have described in your post is way above saying to alexa "alexa what is the temperaure outside?"
You are talking about two or three projects
1.) learn to program C++ on an Arduino
2.) learn to program C++ or whatever language on a Rasperry Pi
3.) learn how the Rasperry Pi and the Arduino can cmmunicate with each other.
You haven't even an idea on what basis the communication should be realised
by wire ? which protocol serial? I2C?, SPI?
wireless? by which technology Bluetooth, WifI, 433MHz, 866Mhz-radio-modules?
If you have to finish your project next tuesday this is a mission impossible.
You could earn some respect from your teacher if you would go to your teacher on monday straight forward saying "I was really lazy and underestimated the effort of my project-idea. Can I re-define my project-goal to a lower level than before? My new suggestion is......
To give you an impression of the effort: I'm a somehow advanced hobbyprogrammer.
I estimate one week learning how to setup a Rasperry Pi to be able to communicate with an Arduino As I don't know much about how to setup a Rasperry Pi for this.
This estimation is based on a quite good knowledge about setting up Operation-Systems like Windows and basic knowledge how to setup a linux-system.
Another 24 to 32 working hours = 3 or 4 days of 8 hours of work per day for programming the Arduino and the Rasperry Py
From my experience I would choose other boards:
A pure Arduino has no wireless connectivity and I don't know much about Rasperry Pi.
So I would choose two ESP32-boards
Two ESP32 modules which can be programmed with the Arduino-IDE using the ESP-NOW protocol which is based on WLAN. I have two months of experience with the ESP-NOW protocol and I already have finsihed three projects using the ESP-NOW-protocol.
So my suggestion is: be honest about your own knowledge about electronics and programming in general.
Do yourself a favor and be honest. You would delay the finishing of your project if you pretend to know more than you really do. The answers given here in the forum will only lead to more questions to you what this or that detail means.
I think if you could show your teacher you have been working a lot of hours to walk up the learning-curve from knwoing almost nothing to XY he will be satisfied.
If you choose to go on pretending "beeing a great programmer" good luck for finding somebody who will do all the work for you and even more luck to be not discovered beeing a pretender.
If you are ready to learn I'm here for you
best regards Stefan
If you have any Arduino code which talks to the Raspberry Pi and runs the motor and servo then post it here and say what it does and what you need it to do.
If you haven't even started yet and you've left it so late that you really need this "fast as possible" then there's not going to be much we can do to help. It takes some time to learn everything you might need.
Steve