Skip to content

Initial commit#4

Open
LuisMirandaAcebedo wants to merge 2 commits into
mainfrom
pedro-luis
Open

Initial commit#4
LuisMirandaAcebedo wants to merge 2 commits into
mainfrom
pedro-luis

Conversation

@LuisMirandaAcebedo

Copy link
Copy Markdown
Contributor

No description provided.

@alexhermida alexhermida left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soamente uns cantos comentarios chorras! :shipit:

Comment on lines +4 to +5
SSID = "A Industriosa"
PASS = "alfageme" No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quizáis deixar aquí unas variables de exemplo, tipo <wifi_ssid> e <contrasinal_wifi>. Sei que non hai nada relevante na wifi pero bueno nunca está de máis 😄

import json
from env_var import url, headers, SSID, PASS

def do_connect(SSID, PASSWORD):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As variables de entorno está ok en mayúsculas, pero os parámetros das funcións idealmente serían en minúsculas

from env_var import url, headers, SSID, PASS

def do_connect(SSID, PASSWORD):
print('Conectando a la red', SSID +"...")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dende Python 3.6 idealmente podes usar "string interpolation" (https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals)

print(f"Conectando a la red {SSID}...")

Noutro caso str.format() https://docs.python.org/3/library/stdtypes.html#str.format

Comment on lines +72 to +77
if(numero_pixels <= 4):
for i in range(3, int(numero_pixels) - 1, -1):
neo[i] = (0, 16, 0)
else:
for i in range(4,int(numero_pixels), 1):
neo[i] = (0, 16, 0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aquí pérdome un pouco con obxetivo 😅 , entendo que e a "barra de progreso"?, creo que teño que probar o código!

neo.write()

led_onboard.value(not led_onboard.value())
sleep(0.5) No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En Python sempre una liña en blanco o final do ficheiro 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants