<jupyter_start><jupyter_text>Arduino Control usimg Python<jupyter_code>import serial
import time

arduino=serial.Serial('COM4', 9600)
time.sleep(2)

print("Enter 1 to turn ON LED and 0 to turn OFF LED")

while 1:
    
    datafromUser=input()

    if datafromUser == '1':
        arduino.write(b'1')
        print("LED  turned ON")
    elif datafromUser == '0':
        arduino.write(b'0')
        print("LED turned OFF")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12416851441241686, 'fraction_numerical': 0.028824833702882482, 'mean_word_length': 3.5656565656565657, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '609532', 'license': 'MIT', 'n_tokens_mistral': 171, 'n_tokens_neox': 162, 'n_words': 39, 'path': 'LED Control using Python and Arduino.ipynb', 'repo_name': 'UttamBasu/LED-Control-using-Arduiono-and-Python', 'size': '451'}