Questions tagged [pyfirmata]
28 questions
3
votes
3 answers
pyFirmata gives error: module 'inspect' has no attribute 'getargspec'
I'm trying to use pyFirmata, but I can't get it to work. Even the most basic of the library does not work. I guess there is something wrong with the library code.
from pyfirmata import Arduino,util
import time
port = 'COM5'
board = Arduino(port)
I…

clueless
- 33
- 1
- 3
2
votes
1 answer
Using PyFirmata with a simulator like SimulIDE
I'm trying to learn PyFirmata, but don't want to get all of the hardware I need to do so. Instead I want to use a simulator, right now I'm using SimulIDE. In order to use PyFirmata, a board has to be connected to a COM port. Is there a way to get…

kmoore1616
- 23
- 3
1
vote
0 answers
Command Prompt Gets Stuck Upon Running PyFirmata Function
I'm trying to run some Python to control a servo on my Arduino. About a week ago, I got it all working, and there were no issues. Now, when I run the same code (code below) my computer gets stuck in the rotate function. Im using the module…

Sir Narwhal
- 11
- 1
1
vote
1 answer
Arduino pyfirmata analog reading problems
I am having some problems reading analog values from my Arduino Mega using pyfirmata.
I use Arduino Mega with a Mega Sensor Shield.
I would like to read analog values from a HW-201 IR sensor (pin A5).
I have uploaded the Standard firmata sketch on…

dcupolillo
- 13
- 3
1
vote
0 answers
Reading multiple analog pins by usin pyFirmata on Arduino UNO
I'm trying to read multiple analog pins from Arduino UNO with pyFirmata but I have a problem that reading it as below results like the pins are connected.
if __name__ == '__main__':
board = Arduino('/dev/ttyACM0')
…

Arkadiusz Bryłkowski
- 11
- 2
0
votes
1 answer
Unable to access analog pins (Arduino Mega, pyfirmata)
I'm trying to read some values from analog joystick using my Arduino Mega 2560 board. Since I intend to use my Arduino in a bigger Python project, I am using pyfirmata to write the code. However, I am unable to access all of my analog pins, which…

Jayne
- 27
- 6
0
votes
0 answers
Arduino digital input read in pyfirmata gives output as none
I am connecting a MH sensor to a digital pin (board arduino uno), want to read the digital value of this sensor using PYFIRMATA. this is the code t wrote :
import pyfirmata
board = pyfirmata.Arduino('COM6')
pin_number = 2
board.digital[2].mode =…

Amine El Kahmaze
- 1
- 2
0
votes
0 answers
Connecting Arduino Mega 2560 to Python with PyFirmata
I am currently controlling two servos using the Arduino IDE, but now need to integrate my Arduino code into a Python script. However, having followed the exact procedure of translating Arduino code to Python and downloading/using the correct…
0
votes
0 answers
Pyfirmata permission denied in Android (pydroid )
When I try to connect my Arduino uno with my Android device using pyfirmata (for connection) and kivymd(for ui) in pydroid ide , i get permission denied '/dev/bus/usb/001/002'.Im using usb otg connection.
Can someone help me let me connect my…

Omanshu
- 1
0
votes
1 answer
Import pyfirmata could not be resolved
I tried importing pyfirmata module and it does not recognise it. This is th error i get when hovering over it: "Import "pyfirmata" could not be resolved Pylance(reportMissingImports)"
This is the code:
from pyfirmata import Arduino, util
import…

Maisu
- 3
- 2
0
votes
2 answers
proper communication between python and Arduino IDE
I am currently working on a project that uses emotion detection to turn one of two motors based on the emotion it picks up. The issue im having is that whenever i input "happy" or "sad" the corresponding motor does not move at all. Before i had this…

KingSpaceKadet
- 1
- 1
0
votes
1 answer
I can't read analog pin with python, pyfirmata
I'm trying to read analog pin for push button. But ı cant read. ı get this error all the time.
My code:
import pyfirmata
import time
from pyfirmata import util
port = "COM4" # port number
board = pyfirmata.Arduino(port)
it =…
0
votes
1 answer
Pyfirmata throws error after creating arduino object
I'm trying to start an arduino project but every time I try running it it throws an error. I think I might have gotten some of the setup wrong?
I've uploaded the Standard Firmata Sketch to the Arduino Mega and installed pyFirmata. I can't really…

Sumito
- 3
- 1
0
votes
1 answer
why does not pyfirmata import?
I just wanted to make python and Arduino work together. I saw tutorial that showed that we need library called "Pyfirmata" to do it. when I type "pip install pyfirmata" in command prompt, it shows that the library is already installed. but when I…

levan tulashvili
- 29
- 5
0
votes
3 answers
Using Arduino Ultrasonic Sensor with Pyfirmata
I'm trying to use pyfirmata to use an Arduino Ultrasonic sensor. I used Arduino Uno board and HC-SR04 Ultrasonic sensor. Here is the code I'm using. The code ran smoothly, it's just that it seems the echo pin failed to get an impulse from the…