adafruit

(Adafruit_Python_DHT - Raspberry Pi) in get_platform RuntimeError: Unknown platform

一个人想着一个人 提交于 2021-02-11 12:44:35
问题 I have a Raspberry Pi 4 connected with a DHT22 sensor, and I want to read data from my sensor. So I installed the library Adafruit_DHT sudo pip3 install Adafruit_DHT then, I navigate to the directory Adafruit_Python_DHT/examples/ , and then, since I have a DHT 22 sensor connected to GPIO pi n° 4 , I run python AdafruitDHT.py 22 4 and I get (lab_app) root@Raspberry100:/var/www/lab_app/Adafruit_Python_DHT/examples# python AdafruitDHT.py 2302 4 Traceback (most recent call last): File

Exception 28 thrown on ESP8266-01 when connected to Adafruit MQTT and Telegram

孤街醉人 提交于 2021-01-29 14:17:19
问题 The title is quite self-explanatory, but I will try to explain the issue further here so as to be more precise. My code runs on an ESP8266-01 connected to a fan and is used to control it through Telegram (with its own bot) and Adafruit MQTT, from both of which it receives a command (not at the same time, it's just to have multiple ways to control the fan in case I don't have my phone by me). Anyway, this is where the problems kick in: after an indeterminate amount of time (could be 5 minutes,

How to pass I2C addresses to Adafruit CircuitPython code? (Running ADS1115)

梦想的初衷 提交于 2021-01-28 11:42:42
问题 I'm trying to run two Adafruit ADS1115s off of one Raspberry Pi, using two I2C addresses (0x48, 0x49). The address for each device can be set by tying the ADDR pin high (0x49) or leaving it floating (default, 0x48). I've confirmed that each board works when the address is set to 0x48, and running "i2cdetect 1" confirms that both boards are connected at the correct addresses. I can successfully run this sample code My question is this: How do I get the code to read from I2C address 0x49

Why “No NFC device found” with libnfc and PN532 SHIELD

此生再无相见时 提交于 2020-06-27 13:07:13
问题 I installed the libnfc on my ArchLinux and i would use it through my Adafruit PN532 arduino SHIELD. nfc-list returns me the message "No NFC device found". I have the following file in /etc/nfc/devices.d/pn532.conf that gives me nfc-list uses libnfc 1.7.1 error libnfc.driver.pn532_uart pn53x_check_communication error error libnfc.chip.pn53x Unexpected PN53x reply! nfc-list: ERROR: Unable to open NFC device: pn532_uart:/dev/ttyACM0 Any idea about how to fix that ? TY 回答1: First of all verify

importing dht11 Adafruit python

大兔子大兔子 提交于 2020-01-07 04:30:08
问题 I'm having some difficulties importing the module dht11 from the Adafruit library(https://github.com/adafruit/Adafruit_Python_DHT). I'm using a raspberry pi3 model b, and have installed python 3.5. I downloaded the Adafruit and installed using sudo python3 setup.py install and I'm fairly certain that the installation went well since I connected my temp and humidity sensor and using sudo python3 examples/AdafruitDHT.py 11 2 I get correct reading about temp and humidity, yet when I try to

iOS saves bmp with “Flip row order” format. Can this option be removed in Swift?

六眼飞鱼酱① 提交于 2020-01-06 06:45:51
问题 UPDATE: When taking an iOS-created .bmp and using "Save As..." in Photoshop with "Flip row order" unchecked, this .bmp will then work on the Adafruit PyPortal (thanks John Park for this lead). I've searched in iOS and don't find anything that looks like a "Flip row order" command for bmp image data. Is anyone familiar with how to get iOS data into this "unflipped row order" format? Thanks! John -- The 8-bit bmps I'm creating in Swift on an iOS device aren't showing on an Adafruit PyPortal,

Adafruit_BBIO.ADC.setup() on ubuntu 16.04.1 error

孤街浪徒 提交于 2019-12-25 04:12:18
问题 I installed the Adafruit_BBIO module on my BBB (I downloaded it from github and installed manually). The GPIO works just fine but when I try to use the ADC I get an error as follows: import Adafruit_BBIO.ADC as ADC ADC.setup() The error: Traceback (most recent call last): File "<stdin>", line 1, in <module> RuntimeError: Unable to setup ADC system. Possible causes are: - A cape with a conflicting pin mapping is loaded - A device tree object is loaded that uses the same name for a fragment:

Adafruit NeoPixel library doesn't work when addressing more than 7 LED strips

风流意气都作罢 提交于 2019-12-25 00:07:42
问题 As of my last question on SO I'm working on an interactive 14x14 LED table which is being controlled by an Arduino Mega (for further information about the setup and code have a look here. After fixing the problem with data arriving at the Arduino in the wrong order I'm now facing this problem: In order to control the colours of each pixel on the LED table using Adafruit's NeoPixel library I read in an array of the form int[14][14][3]. This works fine now, but when I try to set the RGB values

Byte array gets truncated when writing to memory of RFID tag using Adafruit PN532 library

杀马特。学长 韩版系。学妹 提交于 2019-12-24 10:35:27
问题 I'm trying to write a byte array that was converted from a hex string into the memory of an NTAG203 RFID tag. I'm using a Raspberry Pi 3, a PN532 chip and the Adafruit PN532 python library. hex_string = '59e7168f267df300018e15b0' formatted_hex = bytearray.fromhex(hex_string) byte_data = bytearray(16) byte_data[3:15] = formatted_hex if not pn532.mifare_classic_write_block(4, byte_data): print('Error! Failed to write to the card.') sys.exit(-1) When I do pn532.mifare_classic_read_block(4) to

ESP32 direct port manipulation

感情迁移 提交于 2019-12-19 04:02:51
问题 Dear StackOverflowers, I am trying to use HX8357D 3.5" TFT from Adafruit (link) with an esp32. The TFT driver has two interfaces: SPI and 8-bit parallel. The provided library from Adafruit (link) only supports SPI on the esp32. I need to have higher display speeds, so I decided to try and add support for the esp32 myself. I'm not experienced at all with this kind of programming, but I liked the challenge. I figured out how the 8-bit interface work by reverse engineering the Arduino Uno/Mega