ikostan/pico

View on GitHub
Update lessons.lesson_1.rst #752
Egor Kostan authored 10 days ago69e41cc5
complete00:00:26
1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
WARNING: unknown engine or channel <codescan:stable>
WARNING: unknown engine or channel <cody:stable>
WARNING: unknown engine or channel <isort:stable>
WARNING: unknown engine or channel <proselint:stable>
WARNING: unknown engine or channel <protobuf:stable>
WARNING: unknown engine or channel <rustfmt:stable>
WARNING: unknown engine or channel <tfsec:stable>
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-bandit:b1124
b1124: Pulling from codeclimate/codeclimate-bandit
c158987b0551: Pulling fs layer
f7a0074baec6: Pulling fs layer
d3652c33ba6f: Pulling fs layer
91bdc615afbe: Pulling fs layer
3ac712e04e08: Pulling fs layer
30af34904229: Pulling fs layer
6d42fbb1fef9: Pulling fs layer
91bdc615afbe: Waiting
3ac712e04e08: Waiting
30af34904229: Waiting
6d42fbb1fef9: Waiting
f7a0074baec6: Verifying Checksum
f7a0074baec6: Download complete
d3652c33ba6f: Verifying Checksum
d3652c33ba6f: Download complete
3ac712e04e08: Verifying Checksum
3ac712e04e08: Download complete
c158987b0551: Verifying Checksum
c158987b0551: Download complete
30af34904229: Verifying Checksum
30af34904229: Download complete
c158987b0551: Pull complete
6d42fbb1fef9: Verifying Checksum
6d42fbb1fef9: Download complete
f7a0074baec6: Pull complete
d3652c33ba6f: Pull complete
91bdc615afbe: Verifying Checksum
91bdc615afbe: Download complete
91bdc615afbe: Pull complete
3ac712e04e08: Pull complete
30af34904229: Pull complete
6d42fbb1fef9: Pull complete
Digest: sha256:4a20738ab9ac2ef317caa32e02acce6222a25cbf52d6076f058aa3223806783d
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-bandit:b1124
docker pull codeclimate/codeclimate-dart:b1028
b1028: Pulling from codeclimate/codeclimate-dart
75ea27cfafcd: Pulling fs layer
5abd52d9bc58: Pulling fs layer
781fb38fc8df: Pulling fs layer
afb51c21cbec: Pulling fs layer
cffa70a98ac0: Pulling fs layer
f9f4cdc69f25: Pulling fs layer
cffa70a98ac0: Waiting
afb51c21cbec: Waiting
f9f4cdc69f25: Waiting
5abd52d9bc58: Download complete
781fb38fc8df: Verifying Checksum
781fb38fc8df: Download complete
cffa70a98ac0: Download complete
afb51c21cbec: Download complete
f9f4cdc69f25: Verifying Checksum
f9f4cdc69f25: Download complete
75ea27cfafcd: Verifying Checksum
75ea27cfafcd: Download complete
75ea27cfafcd: Pull complete
5abd52d9bc58: Pull complete
781fb38fc8df: Pull complete
afb51c21cbec: Pull complete
cffa70a98ac0: Pull complete
f9f4cdc69f25: Pull complete
Digest: sha256:de49410bb06072305a580fa9f77b06c3ee7d2c098b2db4c1d09d69572d7d5968
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-dart:b1028
docker pull codeclimate/codeclimate-pylint:b938
b938: Pulling from codeclimate/codeclimate-pylint
4fe2ade4980c: Already exists
7cf6a1d62200: Pulling fs layer
f0d690b9e495: Pulling fs layer
fac5d45ad062: Pulling fs layer
dd9b067ef6fd: Pulling fs layer
ae19c30bb075: Pulling fs layer
322fbb16ce3a: Pulling fs layer
064681c837fd: Pulling fs layer
4777c8135e2f: Pulling fs layer
c1cade1474ec: Pulling fs layer
9b2c73eee31e: Pulling fs layer
98b60db9dac2: Pulling fs layer
fdeb13433eb3: Pulling fs layer
dd9b067ef6fd: Waiting
4777c8135e2f: Waiting
ae19c30bb075: Waiting
c1cade1474ec: Waiting
322fbb16ce3a: Waiting
064681c837fd: Waiting
9b2c73eee31e: Waiting
98b60db9dac2: Waiting
fdeb13433eb3: Waiting
fac5d45ad062: Verifying Checksum
fac5d45ad062: Download complete
7cf6a1d62200: Verifying Checksum
7cf6a1d62200: Download complete
7cf6a1d62200: Pull complete
dd9b067ef6fd: Verifying Checksum
dd9b067ef6fd: Download complete
f0d690b9e495: Verifying Checksum
f0d690b9e495: Download complete
322fbb16ce3a: Verifying Checksum
322fbb16ce3a: Download complete
064681c837fd: Download complete
c1cade1474ec: Verifying Checksum
c1cade1474ec: Download complete
f0d690b9e495: Pull complete
9b2c73eee31e: Verifying Checksum
9b2c73eee31e: Download complete
4777c8135e2f: Verifying Checksum
4777c8135e2f: Download complete
fac5d45ad062: Pull complete
ae19c30bb075: Verifying Checksum
ae19c30bb075: Download complete
fdeb13433eb3: Verifying Checksum
fdeb13433eb3: Download complete
dd9b067ef6fd: Pull complete
98b60db9dac2: Download complete
ae19c30bb075: Pull complete
322fbb16ce3a: Pull complete
064681c837fd: Pull complete
4777c8135e2f: Pull complete
c1cade1474ec: Pull complete
9b2c73eee31e: Pull complete
98b60db9dac2: Pull complete
fdeb13433eb3: Pull complete
Digest: sha256:a8e867713f52acba347e27ba8063b0eb27b701d7f952b5962d12a277d8710778
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-pylint:b938
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2025-03-05T06:09:13.361332 #1]  INFO -- : Skipping file lessons/lesson_1/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 9
    LED: Pin = Pin(6, Pin.OUT)
       ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.361942 #1]  INFO -- : Skipping file lessons/lesson_3_and_4/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 38
    def get_val(n_val) -> int:
                       ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.377102 #1]  INFO -- : Skipping file lessons/lesson_6/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 8
    PIN_N: int = 14
         ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.381074 #1]  INFO -- : Skipping file lessons/lesson_5/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 9
    PIN_READ: machine.ADC = machine.ADC(28)
            ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.388848 #1]  INFO -- : Skipping file lessons/lesson_9_and_10/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 19
    def __init__(self, message) -> None:
                                ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.397371 #1]  INFO -- : Skipping file lessons/lesson_13/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 10
    pot_red: ADC = ADC(26)
           ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.400123 #1]  INFO -- : Skipping file lessons/lesson_12/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 9
    colors: dict = {'red': (255, 0, 0),
          ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.411687 #1]  INFO -- : Skipping file lessons/lesson_7_and_8/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 13
    Pins: dict = {
        ^
SyntaxError: invalid syntax


I, [2025-03-05T06:09:13.421967 #1]  INFO -- : Skipping file lessons/lesson_11/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 11
    potentiometer: ADC = ADC(28)
                 ^
SyntaxError: invalid syntax
7
bandit
bandit engine documentation
View output
[main]	INFO	profile include tests: None
[main]	INFO	profile exclude tests: None
[main]	INFO	cli include tests: None
[main]	INFO	cli exclude tests: None
8
codescan
codescan engine documentation
SkippedView output
Channel stable not found for codescan, available channels: ["beta"]
9
dart
dart engine documentation
10
fixme
fixme engine documentation
11
git-legal
git-legal engine documentation
12
markdownlint
markdownlint engine documentation
13
pep8
pep8 engine documentation
View output
lessons/lesson_1/main.py lessons/lesson_3_and_4/main.py lessons/lesson_6/main.py lessons/lesson_5/main.py lessons/lesson_9_and_10/main.py lessons/lesson_13/main.py lessons/lesson_12/main.py lessons/lesson_2/main.py lessons/lesson_7_and_8/main.py lessons/lesson_11/main.py .github/ wokwi/wokwi_pico/main.py wokwi/wokwi_pico_w/main.py docs/conf.py
14
pylint
pylint engine documentation
15
sonar-python
sonar-python engine documentation
View output
INFO: Java 1.8.0_111-internal Oracle Corporation (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: Invalid character encountered in file '/code/docs/_static/logo.jpeg' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/_static/logo.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/img/Raspberry-Pi-Pico-Case.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/img/pi_logo.jpeg' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/img/TestAutomationPyramid.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/img/sphinxdoclogo.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/img/component_vs_unit.webp' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 44 files indexed
ERROR: Unable to parse file: /code/lessons/lesson_1/main.py
ERROR: Parse error at line 9 column 3:

    1: """
    2: Raspberry Pi Pico W LESSON 1: Write Your First Program for Absolute Beginners
    3: https://www.youtube.com/watch?v=SL4_oU9t8Ss&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5
    4: """
    5: 
    6: import time
    7: from machine import Pin                                
    8: 
  -->  LED: Pin = Pin(6, Pin.OUT)
   10: IS_ON: int = 0
   11: 
   12: 
   13: def check_toggle_val(val: int) -> None:
   14: 

ERROR: Unable to parse file: /code/lessons/lesson_6/main.py
ERROR: Parse error at line 8 column 5:

    1: """
    2: Raspberry Pi Pico W LESSON 6: Understanding If Statements in MicroPython
    3: https://www.youtube.com/watch?v=mS4YcJ0FcOU&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=6
    4: """
    5: 
    6: from machine import Pin                                
    7: 
  -->  PIN_N: int = 14
    9: LED: Pin = Pin(PIN_N, Pin.OUT)
   10: 
   11: 
   12: if __name__ == '__main__':
   13:     LED.value(0

ERROR: Unable to parse file: /code/lessons/lesson_5/main.py
ERROR: Parse error at line 9 column 8:

    1: """
    2: Raspberry Pi Pico W LESSON 5: Reading Analog Voltages Using a Potentiometer
    3: https://www.youtube.com/watch?v=ODWwErH_iGA&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=5
    4: """
    5: 
    6: from time import sleep
    7: import machine                                
    8: 
  -->  PIN_READ: machine.ADC = machine.ADC(28)
   10: 
   11: X_MIN: int = 96                
   12: X_MAX: int = 65535
   13: 
   14: V_MAX: float = 3.3               
   15: 

ERROR: Unable to parse file: /code/lessons/lesson_9_and_10/main.py
ERROR: Parse error at line 27 column 7:

   14:     """
   15:     Custom exception.
   16:     Raises an error in regard to voltage input.
   17:     """
   18: 
   19:     def __init__(self, message) -> None:
   20:         """
   21:         Call the base class constructor with the parameters it needs
   22:         :param message:
   23:         """
   24:         super().__init__(message)
   25: 
   26: 
  -->  PIN_NUM: int = 16
   28: analogOut: PWM = PWM(Pin(PIN_NUM))
   29: analogOut.freq(1000)
   30: analogOut.duty_u16(0)

ERROR: Unable to parse file: /code/lessons/lesson_13/main.py
ERROR: Parse error at line 10 column 7:

    1: """
    2: Raspberry Pi Pico W LESSON 13: User Specified RGB LED Colors Using Micropython
    3: https://www.youtube.com/watch?v=FLMPjwXqXVw&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=14
    4: """
    5: 
    6: from time import sleep
    7: from machine import (PWM, Pin, ADC)                                
    8: 
    9: 
  -->  pot_red: ADC = ADC(26)
   11: pot_green: ADC = ADC(27)
   12: pot_blue: ADC = ADC(28)
   13: 
   14: led_red: PWM =

ERROR: Unable to parse file: /code/lessons/lesson_12/main.py
ERROR: Parse error at line 9 column 6:

    1: """
    2: Raspberry Pi Pico W LESSON 12: Understanding and Controlling an RGB LED in MicroPython
    3: https://www.youtube.com/watch?v=yZkx-KWbATY&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=15
    4: """
    5: 
    6: from time import sleep
    7: from machine import (Pin, PWM)                                
    8: 
  -->  colors: dict = {'red': (255, 0, 0),
   10:                 'green': (0, 128, 0),
   11:                 'blue': (0, 0

ERROR: Unable to parse file: /code/lessons/lesson_7_and_8/main.py
ERROR: Parse error at line 13 column 4:

    1: """
    2: Raspberry Pi Pico W LESSON 7: Controlling 3 LED with a Potentiometer in Micropython
    3: https://www.youtube.com/watch?v=YqvcSnGd_HQ&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=7
    4: 
    5: Raspberry Pi Pico W LESSON 8: Compound Conditionals and If Statements in MicroPython
    6: https://www.youtube.com/watch?v=uTwm3ydI69w&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=8
    7: """
    8: from time import sleep
    9: from machine import Pin, ADC                                
   10: 
   11: 
   12: 
  -->  Pins: dict = {
   14:     'READ': 28,
   15:     'GREEN': 10,
   16:     'YELLOW': 11,
   17:     'RED': 12,
   18: }
   19: 
   20: 
   21: COLORS: dict = {
   22:     'GREEN': range

ERROR: Unable to parse file: /code/lessons/lesson_11/main.py
ERROR: Parse error at line 11 column 13:

    1: """
    2: Raspberry Pi Pico W LESSON 11: Controlling a Dimmable LED with a Potentiometer
    3: https://www.youtube.com/watch?v=MCo5nXAKyUU&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=11
    4: """
    5: 
    6: from time import sleep
    7: from machine import (PWM, Pin, ADC)                                
    8: 
    9: 
   10: 
  -->  potentiometer: ADC = ADC(28)
   12: 
   13: 
   14: PIN_NUM: int = 16
   15: analogOut: PWM = PWM(Pin(PIN_NUM))
   16: analogOut.freq(

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.335s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------