Polling the keyboard (detect a keypress) in python

How can I poll the keyboard from a console python app? Specifically, I would like to do something akin to this in the midst of a lot of other I/O activities (socket selects, serial port access,...

Implementing use of 'with object() as f' in custom class in python

I have to open a file-like object in python (it's a serial connection through /dev/) and then close it. This is done several times in several methods of my class. How I WAS doing it was opening...

OpenMP and Python

I have experience in coding OpenMP for Shared Memory machines (in both C and FORTRAN) to carry out simple tasks like matrix addition, multiplication etc. (Just to see how it competes with LAPACK)....

Disable DTR in pyserial from code

I'm trying to use pyserial to send data to an arduino. But when I open the COM port it sets DTR low and resets the board. However, I have my arduino code setup such that I have to put it into...

can write to rs232 serial instrument but can't read from it

I have an rs232 serial device and I am trying to read and write to it using python with pyVISA. I am able to write my commands to it using "write" but I If I try to us "read" or "ask" I get a...

ImportError: No module named 'bpy'

I am getting Error ImportError: No module named 'bpy' in Blender console. I am importing bpy module inside Blender console but still getting the Error. After long Googling I found that no one is...

How do you read the serial port with windows 10 core

Using Python on the Raspberry PI, I use similar code to what is shown below to read data from the serial port: baud = 9600 # baud rate port = '/dev/ttyACM0' # serial URF port...

Django migrate does not work when a schema name is passed along with the table name

I have an error when I run: $ python manage.py migrate This is the scenario: I have 2 schemas in my Postgres database. It could be 2 schemas anywhere, right? could be 2 schemas in SQL...

python serial write timeout

I have used pyserial for a couple of days. However, a problem occurs today. I met serial write timeout. Several days before, when I used a switch, everything is OK. But today I changed for another...

Different run speeds in python

I want to get a sample from serial port in python. but when I run the code to know the rate of it, python gives me different values! it is usually about 24000 time per second. But sometimes it...

Tkinter GUI in RPi for arduino project with multiple sensor input

I have an arduino robot collecting 5 different sensor data (flame, gas, distance, temperature and metal sensors). Now I don't have any problems displaying these in the serial monitor of my...

Python parallel execution with selenium

I'm confused about parallel execution in python using selenium. There seems to be a few ways to go about it, but some seem out of date. There's a python module called python-wd-parallel which...

Send binary file over serial with pyserial and python 3.4

I am trying to use python to send a binary file over serial COM port in windows and then write that same stream to a file. In essence, I am trying to make a copy of the file, but since that is not...

Python SQL insert statement not working

I am trying to insert Arduino data into a database through Python, however, it will not do it. Basically I am assigning data that I read in from the serial port assigned to my Arduino and storing...

Convert Google Sheet date serial value into human readable date

Set-up I'm reading a Google Sheet in Python through Google Drive API. I've got a value for a date – a date serial value, which I need to convert into a human readable date. I have: date =...

Arduino rosserial - Unable to sync with device

When I try to use the 'Hello World' program with rosserial and arduino after restarting my pc. The code works fine, however once i stop the serial communication and try to rerun the same code. I...

How can I use rfcomm to connect to multiple android smartphones to my Raspberry Pi 3?

I am trying to connect my Raspberry Pi 3 to three android phones through Bluetooth. I want to use the input of the phones in a python code, but before I start coding I have to make sure I can...

SLURM: Embarrassingly parallel program inside an embarrassingly parallel program

I have a complex model written in Matlab. The model was not written by us and is best thought of as a "black box" i.e. in order to fix the relevant problems from the inside would require...

pySerial can write, but not read

I am trying to use pySerial on a Windows 10 machine (Python 3.6.4, 32 bit) to read serial data from a piece of lab equipment that would normally log its data to a serial ASCII printer. Connecting...

Golang reading from serial

I'm trying to read from a serial port (a GPS device on a Raspberry Pi). Following the instructions from http://www.modmypi.com/blog/raspberry-pi-gps-hat-and-python I can read from shell using stty...

Using Python to find Mac UUID/Serial Number

Basically I was planning on tying the computers UUID/Serial number to the key which it is ran with, On windows I found getting the UUID easy enough however I am struggling to get anything for...

Pyserial: "module 'serial' has no attribute 'tools'"

I have some Devices connected to my Notebook via a RS485 to USB Converter and want to detect them in a python programm. I'm running this Code with PyCharm Community Edition on a Windows 7...

Python script for RTU Modbus Slave

I am working on a automation test case for a system and need a automated modbus input device. My use case here is to implement a Raspberry pi based RTU modbus slave and connected to a modbus...

Android UsbSerial library problem in ch340

I am trying to convert the open-source python project esptool.py to the Android(java) project. In android, for serial communication, I am using USB Serial library. I need only esp8266 feature from...

pySerial PermissionError(13, 'Access denied', None, 5)

I wanted to create a manager for the frige and therefor I wanted to use a EAN Scanner to scan the items. So far I wrote myself a EANScanner class in order to read the EANs from the serial port and...

Raspberry Pi Zero W serial communication

I just got a RPI zero w and I want to communicate to a device through serial comm. I also have a MAX232 board and a RS232 TTL converter. I want to use one of these boards to be able to communicate...

Controlling USB Thorlabs camera via Python - OpenCV

There are several topics on this but many of them are very very old and no real solutions have been offered (or none that work for me for sure). I am trying various libraries to get Python to read...

Unable to send byte from Python serial.write() to Arduino

I wrote a python script that sends and receive data to and from an Arduino. I can receive data without problems, but when I send data it seems like the Arduino is receiving only garbage. The...

SPIFFS Upload Failed Error Code -10010 While uploading files to ESP8266

I have an ESP8266, WEMOS D1 Mini to be exact , im using a Arduino IDE and the plugin to upload a data to the ESP8266 heres the error messages : [SPIFFS] data : C:\WASP-master\data [SPIFFS] size...

Pycharm: import Serial is NOT working but i already did "pip3 install pyserial"

i am quite trouble why my pycharm does not recognize import serial. i am doing python code but i need to use Serial. so just from what i found: i need to go to CMD, then enter "pip install...