Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities includingStack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Loading…
Arduino

Tag Info

usershotnewsynonyms

Hot answers tagged

6votes
Accepted

Arduino Serial Communication with Python: sending an array

If I use >BBB instead of >iii... That's because "B" is a byte. So you end up sending 3 bytes:struct.pack("BBB", 1, 2, 3)\x01\x02\x03"i" is an int and has a size of 4, so you send 4*3 = 12 bytes:...
001's user avatar
  • 963
4votes

How can I execute a string in my Arduino Uno board?

Unless you want to implement some form of scripting engine, you can't.Arduino code is compiled code, not interpreted code. There is no way of converting text into runnable code, since that is done by ...
Majenko's user avatar
4votes

Pan and tilt bracket move to sound, control servo motors using microphone sound sensors

What you are trying to achieve is not easy. Expect to spend a lot of timedeveloping, testing and tuning it.The first step would be to work the acoustics of your device. The soundsensors are not ...
Edgar Bonet's user avatar
4votes
Accepted

How to ignore garbage values in serial communication between arduino and python

The effect that you see is type promotion, in the C++ standard called "integral promotion", which happens implicitly. Values of type char are cast to int. Commonly, and in your case too, the ...
the busybee's user avatar
3votes
Accepted

Problem sending string with Python to Arduino through serial port

The AVR Arduinos (Uno, Nano, Mega) have auto-reset function. At opening of USB connection the circuit around USB resets the MCU. After reset the bootloader waits a second for a new upload. If the ...
Juraj's user avatar
  • 18.3k
3votes
Accepted

easy_install pip on Arduino Yun fails

Found this Arduino Forum Thread helpful.# wget \https://pypi.python.org/packages/source/p/pip/pip-6.0.8.tar.gz#md5=2332e6f97e75ded3bddde0ced01dbda3\ --no-check-certificate# easy_install pip-6.0....
Shan-Desai's user avatar
3votes

share enum between python and arduino

One approach that I have used for similar purposes is to generate the appropriate header files (or module or whatever) from a simple text file for all the required uses.Since you already know python ...
Mat's user avatar
  • 464
2votes

Can't communicate with arduino using python (Windows)

you must use this code>>> import serial>>> ser.close() # close port
user70011's user avatar
2votes

Programming an Arduino using Python, rather than C/C++

Yes,its possible with the recent new ArduinoPro H7 which has abilities to upload a written programme in Python and JavaScript and its a dual core,32bit.
Boyd's user avatar
2votes
Accepted

How to work with analog readings using RPi and Firmata?

It does not appear that Firmata has proceeded with the ability to change the analog reference source. You referenced one of the issues opened for it, but I don't see anywhere where it committed to the ...
jose can u c's user avatar
2votes
Accepted

Arduino Python to Serial command

Majenkos comment (above) solved the problem:"You need to wait after opening the serial port for the board to finish resetting and the bootloader to run and exit before you can send any commands."...
digit's user avatar
2votes

Running Python on Arduino

To my knowledge, there is not a "python to ATMega architecture" compiler out there. However, it's not true that MicroPython only runs on PyBoard. There are versions for installation also on the ...
jose can u c's user avatar
2votes

Arduino and Python

You can not run python on an UNO. If you want to use python on a microcontoller you should look into boards supported by MicroPython or Circuit Python
Craig's user avatar
  • 2,120
2votes

Run python in Windows OS installed in micro SD card which is read by Arduino microcontroller board

With some Arduino boards, yes. You want a board like the Yun (unfortunately retired now, but there are probably others similar) which has a MIPS SoC on it that runs Linux (specifically OpenWRT). The ...
Majenko's user avatar
2votes

How to link a computer processor to an Arduinno on a board?

It sounds like you need a lot of compute power. You can either put the sensors and AI on one device (and @majenko's suggestion of a Raspberry Pi would be a direction to pursue) or you need two devices,...
JRobert's user avatar
  • 15.4k
2votes

wdt reset cause:4, boot mode:(3,6)

You're calling delay() in the onWsEvent() callback. The ESPAsyncWebServer documentation specifically says not to do that in the 'Important things to remember' section:You can not use yield or delay ...
romkey's user avatar
  • 1,583
2votes
Accepted

Why do I need to use latin-1 instead of utf-8 when using python with arduino?

but is there something about arduino that requires using latin-1?No, not really.What it comes down to is that Serial.read() reads bytes, irrespective of whatever encoding they may be being used ...
timemage's user avatar
2votes
Accepted

What is the difference when an arduino has been unplugged vs when a serial port connection was closed?

We cannot know, if your python code also has a problem. But your Arduino code will send the series of "V" only once.You are using this while loop:while(counter < maxnum)in there you ...
chrisl's user avatar
  • 16.6k
2votes

Arduino randomly stops sending data to python over serial

I removed free(value) - rookie mistake - but that didn't completely solved the problem (but reduced frequency of occurrences).Seems like declaring array like char val[50] and passing it to function ...
Wisien's user avatar
2votes
Accepted

get data from arduino using python

I would embed the call to .getData() into a try block and handle this specific exception with except UnicodeDecodeError. There can always be a transmission error, especially when the script is started....
Sim Son's user avatar
  • 1,878
2votes

`time.sleep` in python script reading serial output causes erratic behavior

Thanks to chrisl and timemage's comments, I figured out the issue: the Arduino was sending the data too fast and the bytes were piling up in the computer's inbound buffer. I solved this by adding a ...
Manav Bokinala's user avatar
2votes
Accepted

Sending float values from Python to Arduino using Serial communication

There are two things going on here.First of all, if you look up the readline() method in Python that is referenced in the PySerial manual, you'll see the following:readline(size=- 1, /)Read and ...
Nick S.'s user avatar
2votes
Accepted

What is the best (fastest and most robust) way to send messages back and forth between Python on a PC and an Arduino, over serial?

There is no best way, but there is a better way (and more efficient way).For an arbitrary forward torque of '50', the sending frame should be:[161, 0, 0, 0, 50, 0, 0, 0]And for a command of '-50', ...
hcheung's user avatar
  • 1,978
2votes

Sending values with pyserial does not function if there is also sensing on Arduino Due

Opening a Serial connection will reset the Arduino. The python code may be doing that when it creates the port. Put a Serial.print("Starting") line in your setup function to see if that's ...
Delta_G's user avatar
  • 3,391
1vote
Accepted

How Should I Send Data to My Laptop from Multiple Arduinos?

There are multiple solutions but the simplest one is probably to use Software serial, I2C, or SPI. The idea is basically the same for any of the protocols. You select one Arduino which is gonna be the ...
Coder_fox's user avatar
1vote
Accepted

Arduino communication protocol with python - beyond pyserial and Arduino example

Ok, after quite some time looking for something that would allow me to easily control an arduino with the raspberry pi, I found the FIRMATA protocol which allows one to communicate with the arduino ...
will.mendil's user avatar
1vote
Accepted

Is there a way to send data from Tensorflow to Arduino via Bluetooth?

The question is more "Is there a way to send data from Python ?" than "Is there a way to send them from Tensorflow to an Arduino ?" and the Answer is yes.In Tensorflow your can recover your result in ...
Liam's user avatar
  • 126
1vote

Arduino will not read three successive packets in the serial connection

The problem is that your code works but you substract 48 from what you received. Which if python sends a char with values: '0' '1' '2' it will result in the serially outputted values of NUL SOH STX ...
Tarick Welling's user avatar
1vote
Accepted

Programming the serial description

On a normal Arduino board, no, it's not possible from a sketch POV. With a Leonardo or similar ATMega32U4 based board it may be possible to give it a unique VID/PID combination, and even possibly ...
Majenko's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible

192

questions tagged

Related Tags

 × 192
 × 93
 × 61
 × 17
 × 17
 × 12
 × 11
 × 11
 × 10
 × 9
 × 7
 × 7
 × 7
 × 6
 × 6
 × 6
 × 5
 × 5
 × 5
 × 4
 × 4
 × 4
 × 3
 × 3
 × 3

[8]ページ先頭

©2009-2025 Movatter.jp