Skip to main content

A Python module to generate Arduino code for BowCar.

Project description

바우카를 이용하여 파이썬을 배우기 위한 모듈입니다. this module for study python with bowcar hardware.

arduino-cli 프로그램의 설치가 필수입니다. this module need 'arduino-cli' program.

명령어

  1. 시간 지연 관련

    • BowCar.delay(time) : time(ms)만큼 지연
  2. led 관련

    • BowCar.red_on() : 빨간 led 켜기
    • BowCar.red_off() : 파란 led 끄기
    • BowCar.blue_on() : 파란 led 켜기
    • BowCar.blue_off() : 파란 led 끄기
    • BowCar.all_light_on() : 모든 led 켜기
    • BowCar.all_light_off() : 모든 led 끄기
  3. 부저 관련

    • BowCar.buzzer_on(scale, octave, note) : octave의 scale에 해당하는 음을 note음표 만큼 실행
    • BowCar.buzzer_off() : 부저 끄기
    • BowCar.set_duration(time) : 부저음의 기본 길이를 time(ms)만큼 조정
  4. 모터 관련

    • BowCar.set_speed(type, speed) : type('l','r','a')의 속력 값을 speed로 설정
    • BowCar.set_direction(type, direction) : type('l','r','a')의 방향을 direction으로 설정(기본 값 정면)
  5. 조도 센서 관련

    • BowCar.get_light() : 조도 센서 값 읽어오기
    • BowCar.is_light(type,thresehold) : 조도 센서 값이 기준값 thresehold 보다 큰지 작은지 타입에 따른 결과를 1과 0으로 return
  6. 버튼 관련

    • BowCar.get_button(type) : 버튼 type('u','d','l','r')의 값을 return
    • BowCar.is_push(type) : 버튼 type('u','d','l','r')이 누른 상태면 1, 아니면 0을 return
  7. 사운드 센서 관련

    • BowCar.get_sound() : 사운드 센서 값 읽어오기
    • BowCar.is_sound(type,thresehold) : 사운드 센서 값이 기준값 thresehold 보다 큰지 작은지 타입에 따른 결과를 1과 0으로 알려줌
  8. 라인 트레이서 관련

    • BowCar.get_line(dir) : dir('l','r') 방향의 라인트레이서 값 읽어오기
    • BowCar.is_line(dir,type,thresehold) : dir('l','r') 방향의 라인트레이서 값이 기준값 thresehold 보다 큰지 작은지 타입에 따른 결과를 1과 0으로 알려줌
  9. 초음파 센서 관련

    • BowCar.get_distance() : 초음파 센서로 거리 값 구하기
    • BowCar.distance(type,thresehold) : 초음파 센서로 얻은 거리 값이 기준(thresehold)보다 큰지 작은지 타입에 따른 결과를 1과 0으로 알려줌
  10. 반복문 관련

    • bfor("변수 초기화; 조건; 변화") : 들여쓰기를 기준으로 for문 작성
    • bwhile("조건") : 들여쓰기를 기준으로 조건을 만족하는 동안 계속 작동하는 while문 생성
    • bbreak() : 반복문에 브레이크 집어넣기
  11. 조건문 관련

    • bif("조건") : 조건문 들여쓰기로 작성
    • belif("조건") : 조건문 들여쓰기로 작성
    • belse() : 조건문 들여쓰기로 작성
  12. 변수 관련

    • set_value(종류, 이름, 값) : 변수가 없다면 새로 선언하고 저장합니다. 하지만 이미 변수가 있다면 바로 설정합니다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bowcar-1.1.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bowcar-1.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file bowcar-1.1.0.tar.gz.

File metadata

  • Download URL: bowcar-1.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for bowcar-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d7d1f6d298a50cc526694892cb9e54f2d3b2e0e5e9abd2c1afecda5690cd57ed
MD5 b28e1cf71e2db0a2ade353476a2b87eb
BLAKE2b-256 63d3bdc42a6b1e6f73158340e2c9abb1bd0d55316cb6d3061aafc543ce48d599

See more details on using hashes here.

File details

Details for the file bowcar-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: bowcar-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for bowcar-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2cd5a3a88f5d316fd1177f900f66571fc78c801e86790dd02449cb02064391dc
MD5 dfb43dd5c1b8986b75b4dbec216846d8
BLAKE2b-256 a6fba19d2055c4bade62618800a52297c3054584e9088f8f337d4d1675229a5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page