Arduino serial communication with Raspi or computer with python Please read python format characters and Arduino data types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "Arduino.h" | |
| #include <WiFi.h> | |
| #include "esp_log.h" | |
| #include "esp_system.h" | |
| #include "esp_event.h" | |
| #include "mqtt_client.h" | |
| #define SECURE_MQTT // Comment this line if you are not using MQTT over SSL | |
| #ifdef SECURE_MQTT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def isGanjil(num): | |
| if num %2 == 1: | |
| return True | |
| else: | |
| return False | |
| def showMinimumNumber(listNumber): | |
| # membuat list angka yang isinya hanya angka ganjil | |
| newNumberList = [] | |
| for number in listNumber: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from flask import request | |
| app = Flask(__name__) | |
| @app.route('/',methods=[ 'GET']) | |
| def hello_world(): | |
| return 'GET METHOD' | |
| @app.route('/data',methods=['POST']) | |
| def data(): |
https://code-boxx.com/sqlite-data-html-table-python-flask/
- Run
unpack.bat(Windows)unpack.sh(Linux/Mac). This will automatically:- Create a
templatesfolder, moveS3_users.htmlinside. - Create a
staticfolder, moveS3_users.cssinside. - Create a virtual environment -
virtualenv venv. - Activate the virtual environment -
venv\scripts\activate(Windows)venv/bin/activate(Mac/Linux)
- Create a
- Install Flask -
pip install flask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <h1>Absensi Murid</h1> | |
| <table id="demo"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PyQt5.QtCore import QThread, pyqtSignal | |
| from struct import unpack | |
| from serial import Serial | |
| class SerialWorker(QThread): | |
| # update_data = pyqtSignal(list) | |
| raw_data = pyqtSignal(bytes) | |
| def __init__(self): | |
| super(SerialWorker, self).__init__() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2021 ros2_control Development Team | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| simpan map dari turtlebot | |
| 1. ros2 launch turtlebot3_gazebo turtlebot3_house.launch.py | |
| 2. ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True | |
| 3. ros2 run turtlebot3_teleop teleop_keyboard | |
| 4. ros2 run nav2_map_server map_saver_cli -f ./house_map | |
| ,, | |
| change the DDS | |
| sudo apt install ros-humble-rmw-cyclonedds-cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| const KALIMAT = "selamat malam" | |
| func main() { | |
| result := make(map[string]int) | |
| for _, rune := range KALIMAT { |
OlderNewer