{"id":22345704,"url":"https://github.com/gifflet/planta-iot","last_synced_at":"2026-04-28T11:36:32.214Z","repository":{"id":130781000,"uuid":"139021023","full_name":"gifflet/planta-iot","owner":"gifflet","description":"Planta IoT - Monitore seu estado de umidade ","archived":false,"fork":false,"pushed_at":"2018-06-28T16:08:01.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-29T11:48:38.839Z","etag":null,"topics":["arduino","iot","python","twitter-api"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gifflet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-28T13:20:14.000Z","updated_at":"2018-06-28T16:09:34.000Z","dependencies_parsed_at":"2023-06-03T18:45:36.053Z","dependency_job_id":null,"html_url":"https://github.com/gifflet/planta-iot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gifflet/planta-iot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gifflet%2Fplanta-iot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gifflet%2Fplanta-iot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gifflet%2Fplanta-iot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gifflet%2Fplanta-iot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gifflet","download_url":"https://codeload.github.com/gifflet/planta-iot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gifflet%2Fplanta-iot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32379618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","iot","python","twitter-api"],"created_at":"2024-12-04T09:18:27.206Z","updated_at":"2026-04-28T11:36:32.181Z","avatar_url":"https://github.com/gifflet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Planta IoT - Monitore o seu estado \nEste projeto foi desenvolvido para arduino e desktop, seguindo o esquema abaixo **(com exceção da utilização dos leds)** : \n\u003cimg src=\"https://uploads.filipeflop.com/2016/06/Circuito-sensor-de-solo-umidade-arduino.png\" alt=\"drawing\" width=\"600px\"/\u003e\n\n## Requisitos\n\n### Software\n - [Python 2.7](https://www.python.org/downloads/)\n\t - [tweepy](https://pypi.org/project/tweepy/)\n\t - [serial](https://pypi.org/project/pyserial/)\n - [Arduino IDE](https://www.arduino.cc/en/Main/Software#download)\n\n### Hardware\n\u003ccenter\u003e\nSensor de umidade de solo (YL-69)\u003cbr\u003e\n\u003cimg src=\"https://uploads.filipeflop.com/2017/07/sensor-de-umidade-do-solo-higrmetro-modulo-arduino-pic-22453-MLB20230474993_012015-O.jpg\" alt=\"drawing\" width=\"200px\"/\u003e \u003cbr\u003e\u003cbr\u003e\nMódulo chip comparador (LM393)\u003cbr\u003e\n\u003cimg src=\"https://uploads.filipeflop.com/2017/07/450xN-1-2.jpg\" alt=\"drawing\" width=\"200px\"/\u003e \u003cbr\u003e\u003cbr\u003e\n\u003c/center\u003e\n\n## Como isso funcionamento?\nCada mudança do estado de umidade da terra detectada faz com que o arduino escreva na porta serial o estado atual de umidade recebido. Para isso, é necessário iniciar a comunicação serial e habilitar a entrada analógica `A0`, como podemos ver no arquivo `planta_iot.ino`:\n```c\n#define  pino_sinal_analogico A0\n\nvoid setup() {\n\t//Inicia a comunicação serial\n\tSerial.begin(9600);\n\t//Habilita entrada analógica A0\n\tpinMode(pino_sinal_analogico, INPUT);\n}\n```\nO processo de monitoração é continuo, tendo uma curta interrupção de 100 milissegundos:\n```c\nvoid loop() {\n\n\t//Le o valor do pino A0 do sensor\n\tvalor_analogico = analogRead(pino_sinal_analogico);\n\n\t//Solo com umidade alta\n\tif (valor_analogico \u003e 0 \u0026\u0026 valor_analogico \u003c 400) {\n\t\testado_atual = UMIDO;\n\t}\n\t//Solo com umidade moderada\n\tif (valor_analogico \u003e 400 \u0026\u0026 valor_analogico \u003c 800) {\n\t\testado_atual = MODERADO;\n\t}\n\t//Solo com umidade baixa\n\tif (valor_analogico \u003e 800 \u0026\u0026 valor_analogico \u003c 1024) {\n\t\testado_atual = SECO;\n\t}\n\tif(ultimo_estado != estado_atual) {\n\t\tultimo_estado = estado_atual;\n\t\tSerial.print(estado_atual);\n\t}\n\tdelay(100);\n}\n```\n\nOs bytes escritos, pelo arduino, na porta serial são lidos na outra ponta dessa comunicação, no desktop, pelo `arduino_tweet.py`. Cada byte lido é interpretado para um estado de umidade e cada estado de umidade possui uma mensagem apropriada para servir de conteúdo para um tweet. É necessário realizar o [procedimento de obter as credenciais](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens.html) para a utilização da api do twitter. Após realizado, substituir os respectivos valores das seguintes variáveis no arquivo `arduino_tweet.py`:\n```python\n#twitter application credentials\nconsumer_key=\"CONSUMER_KEY\"\nconsumer_secret=\"CONSUMER_SECRET\"\n\n#twitter user credentials\naccess_token=\"ACCESS_TOKEN\"\naccess_token_secret=\"ACCESS_TOKEN_SECRET\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgifflet%2Fplanta-iot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgifflet%2Fplanta-iot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgifflet%2Fplanta-iot/lists"}