Code Monkey home page Code Monkey logo

dogsoul's People

Contributors

interestingbrainpoops avatar underdogrobot avatar viktor117 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dogsoul's Issues

code from today

import machine
import time

# Set up UART1 with the appropriate baud rate and pins.
uart1 = machine.UART(1, baudrate=115200, tx=machine.Pin(4), rx=machine.Pin(5))

def read_char_from_uart(uart):
    while not uart.any():
        pass
    return uart.readline()

def write_char_to_uart(uart, char):
    uart.write(char)
    uart.flush()

while True:
    # Read a character from UART1
    received_char = read_char_from_uart(uart1)
    print(received_char.decode('utf-8'))

#         # Modify the received character (e.g., increment it)
#         modified_char = chr(ord(received_char) + 1)
#         
#         print("Xmiting character:", modified_char)
# 
#         # Write the modified character back to UART1
#         write_char_to_uart(uart1, modified_char.encode('utf-8'))

    # Wait a bit to avoid flooding the UART
    time.sleep_ms(3)



Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.