전체 글
-
라즈베리파이 피코 w + bme680카테고리 없음 2023. 7. 30. 12:56
thonny 프로그램의 lib 디렉토리에 bme680.py를 저장합니다. # Spaces, comments and some functions have been removed from the original file to save memory # Original source: https://github.com/adafruit/Adafruit_CircuitPython_BME680/blob/master/adafruit_bme680.py import time import math from micropython import const from ubinascii import hexlify as hex try: import struct except ImportError: import ustruct as struct ..
-
라즈베리파이 피코카테고리 없음 2023. 7. 29. 11:29
rp2-pico-w-20230426-v1.20.0.uf2 이 파일을 잘못 받아서, 하루 시간 날려버렸네요.. 라즈베리파이 피코 wifi 버전을 잘 확인하고 설치하세요. import machine import time led = machine.Pin('LED', machine.Pin.OUT) while (True): led.on() time.sleep(1) led.off() time.sleep(1) led.off() from network import WLAN, STA_IF from time import sleep from machine import Pin from dht import DHT22 import socket led = machine.Pin('LED', machine.Pin.OUT) pin3 =..
-
BME680 온도,습도,압력,대기질센서카테고리 없음 2023. 7. 23. 14:23
curl https://get.pimoroni.com/bme680 | bash git clone https://github.com/pimoroni/bme680-python GitHub - pimoroni/bme680-python: Python library for the BME680 gas, temperature, humidity and pressure sensor. Python library for the BME680 gas, temperature, humidity and pressure sensor. - GitHub - pimoroni/bme680-python: Python library for the BME680 gas, temperature, humidity and pressure sensor. ..
-
jetson nano 고정 아이피 설정카테고리 없음 2023. 6. 11. 17:24
jetson nano 고정 아이피 설정 sudo vi /etc/NetworkManager/system-connections/eth0 [connection] id=eth0 uuid=ad67a7b1-d13b-4495-9195-64e732c5097a type=ethernet permissions= [ethernet] mac-address-blacklist= [ipv4] dns-search= method=manual address=192.168.168.164 gateway=192.168.168.1 dns=192.168.1.1 [ipv6] addr-gen-mode=stable-privacy dns-search= ip6-privacy=0 method=auto sudo systemctl restart NetworkM..
-
Flask, form 예제카테고리 없음 2023. 5. 28. 17:15
Form 1 Name: Email: Form 2 Username: Password: from flask import Flask, request, render_template app = Flask(__name__) @app.route('/form1', methods=['GET', 'POST']) def handle_form1(): if request.method == 'POST': name = request.form.get('name') email = request.form.get('email') print(name, email) # Process the form data for form1 return f"Form 1: Name - {name}, Email - {email}" return render_te..
-
우분투에서 microsoft-edge 사용하기카테고리 없음 2023. 5. 6. 17:55
sudo apt update sudo apt install software-properties-common apt-transport-https wget wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" sudo apt install microsoft-edge-dev
-
안드로이드 앱에서 이미지 파일 선택하여 보여주기카테고리 없음 2023. 4. 21. 13:18
public class MainActivity extends AppCompatActivity { private final int GET_GALLERY_IMAGE = 200; private ImageView imageview; private Button pickButton; @SuppressLint("MissingInflatedId") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); pickButton = (Button)findViewById(R.id.pickButton); pickButton.setOnCli..
-
승무지시서 좌표값읽어오기카테고리 없음 2023. 4. 18. 16:16
import io import os import re from google.cloud import vision_v1 from google.cloud.vision_v1 import types def detect_text(path, target_strings): client = vision_v1.ImageAnnotatorClient() with io.open(path, 'rb') as image_file: content = image_file.read() image = types.Image(content=content) # Vision API를 사용하여 이미지에서 텍스트 감지 response = client.text_detection(image=image) # 감지된 문자 리스트로 변환 texts = res..