I have multiwii board connected to raspberry pi 3A and I want to calibrate the mpu6050 sensor from raspberry pi using python programming, can anyone help me out on how I can program this, please?
Try to be more specific in you questions for te next times.
But, to calibrate a Gyro you should take a look at this tutorial.. Or if you are a really begginer and wants to learn how to use the sensor, take a look to this.
This and this tutorial are also useful.
Related
I am currently working on my A-Level computer science project and I need help. I am currently developing an app in Kivy, and I need to use this app to wirelessly control LEDs via a raspberry Pi and send SMS messages to phones (again, via the Pi). I also need to Pi to detect motion via a PIR sensor. I am not entirely sure how to go about this and I would very much appreciate it if someone could help me. I need to know what kind of hardware I will need and if anybody could point me in the right direction for the code, I would be very grateful.
I am new here, so please be patient with me
I have bought a respeaker device. I wanted to connect a bunch of sensors to it (bme280,lsm9ds1,tsl2561) but it turns out that I can't use the same raspberry pi code with it instead I have to use mraa and upm.
The bme280 worked fine with the upm library but the lsm9ds1 and tsl2561 did not work.
So is there any mraa code for these sensors or I have to write it my self? and if so how can I get started?
note: all these sensors are from adafruit.
Thanks anyway :)
DIY
use the library that I have created https://github.com/omar7altawil/LSM9DS1-I2C
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
audio = r.listen(source)
print(r.recognize_sphinx(audio))
When I run this code in Python in raspberry pi 3 (model B), it gives the following error.
OSError: No Default Input Device Available
what is the reason for this? do I need to have a USB microphone to get the audio signals in rather than using the microphone in earphones?
< /Hey >
As designed by the Raspberry Pi's circuit layout, in short:
The 3.5mm Audio Jack on the Raspberry Pi models cannot be used as an audio input.
I'm not sure if you would want to anyways.
This means you have a couple of options on how you want to set up your microphone setup.
1. Using a small mic array (Like Alexa Echo or Google Home)
A lot of the time these kind of systems are prototyped on Raspberry Pi's or similar (see the official Alexa development kit). You can find similar replicas to the microphone arrays found on google home etc. , specifically fitted for the Raspberry Pi. These include some added advanced features such as Noise Suppression, Direction of Sound Source and other neat features I'll leave for you to explore yourself.
Here's 3 I found after googling (I'm sure if you look you can find more):
ReSpeaker 4-mic array
ReSpeaker 7-mic array
Matrix Creator
If you wanted high quality results for speech recognition I'd probably begin to look more down this route.
2. Using a normal USB microphone
Probably the most common approach is to get a standard USB microphone that has Raspberry Pi drivers and use this. I found one from Adafruit which I'm sure is just plug and play which could be nice and easy to get going with.
Again I'm sure you'll find plenty of other options online, these were just suggestions to get you started.
Hopefully this helps! :-)
What you could use is a USB microphone, these tend to install the required drivers and work out of the box more easily.
Source: https://www.raspberrypi.org/forums/viewtopic.php?t=188108
I have been working with some drones and robotics projects using arduino and python. There was a kickstarter project for a neat little hex copter, that hasn't been managed well.
I was lucky, i got my copter and then some time later after some frustrated email exchanges, i finally recieved the camera as well. To this day, their forum has people still complaining. Their maker forum is now down and their wiki hasn't been updated with any specifics on the camera.
http://www.flexbot.cc/wiki/index.php?title=Main_Page#Hardware
Their app to accompany the drone still doesn't support the camera module. Not that it'd matter, as their code isn't very well documented or annotated.
https://github.com/HexAirbot
There are some tips on switching the camera on the comments page of their kickstarter campaign.
https://www.kickstarter.com/projects/1387330585/hex-a-copter-that-anyone-can-fly/posts/1093716
So, sob story over, i'm stuck with this neat little wifi camera that i am unsure on how to connect to. I know how to switch it on and it does have a micro-usb port on it.
What library in Python could i use to stream an image from this camera given that it is a wifi camera. If i wanted the video stream as a numpy matrix.
I need to interface with the camera, so i can connect and disconnect.
Then, be able to read images frame by frame with ffmpeg. I have some python modules that can detect and read from a camera, but how can my code ensure that the camera is connected?
Totally stuck. Any help would be appreciated.
Considering you are building for the android platform, you will more than likely need to use some sort of java/python driver/interface, unless you just use java.
Here is an article on java/python, and using python from within java.
Using Python from within Java
I am new to coding and I am trying to control ESCs through a PS3 controller which will be coded on the Raspberry Pi B+. I think this can be done, but i have read in a lot of places that I need to use an additional board? Is this the case?
I have found some code which i was going to manipulate..
http://www.raspians.com/Knowledgebase/ps3-dualshock-controller-inst...
http://mechnable.com/content/raspberry-pi-controlling-4-servos-via-...
Please advise me on if I need another board?
My project: is to create a system which can VTOL. So I wanted to control the ESCs with an input from the PS3 controller.