This file contains 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
/* | |
Flame Sensor With Arduino For Fire Detection | |
For more details, visit: https://techzeero.com/arduino-tutorials/flame-sensor-with-arduino-for-fire-detection/ | |
*/ | |
int Buzzer = 13; // Use buzzer for alert | |
int FlamePin = 2; // This is for input pin | |
int Flame; | |
void setup() { |
This file contains 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 dash import Dash, dcc, html, Input, Output | |
app = Dash() | |
app.layout = html.Div([ | |
dcc.Dropdown( | |
id='dropdown1' # Dropdown id | |
options=[{'label': 'India', 'value': 'India'}, | |
{'label': 'Russia', 'value': 'Russia'}, | |
{'label': 'USA', 'value': 'USA'}], # Data to be shown in dropdown options |
This file contains 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 dash import Dash, dcc, html, Input, Output | |
app = Dash() | |
app.layout = html.Div([ | |
dcc.Dropdown( | |
options=[{'label': 'India', 'value': 'India'}, | |
{'label': 'Russia', 'value': 'Russia'}, | |
{'label': 'USA', 'value': 'USA'}], # Data to be shown in dropdown options | |
value='India', # Dropdown Default Value |
This file contains 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
import dash | |
import dash_html_components as html | |
import dash_core_components as dcc | |
import plotly.express as px | |
from dash.dependencies import Input, Output | |
app = dash.Dash() | |
df = px.data.iris() |
This file contains 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
@app.callback(Output(component_id='graph', component_property= 'figure'), | |
[Input(component_id='dropdown', component_property= 'value')]) | |
def graph_update(dropdown_value): | |
fig = px.scatter(df[df["species"]==dropdown_value], x="sepal_width", y="sepal_length") | |
fig.update_layout(title = 'Sapel Length and Width of Different Species', | |
xaxis_title = 'Sepal Width', | |
yaxis_title = 'Sepal Length') | |
return fig |
This file contains 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
app = dash.Dash() | |
df = px.data.iris() | |
app.layout = html.Div([ | |
html.H1( | |
id = 'H1', | |
children = 'Styling using html components', | |
style = {'textAlign':'center', 'marginTop':40,'marginBottom':40} | |
), |
This file contains 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
import dash | |
from dash import html | |
from dash import dcc | |
import plotly.express as px |
This file contains 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
pip install dash | |
pip install dash-html-components | |
pip install dash-core-components | |
pip install plotly |
This file contains 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
/* | |
Display Custom Characters on 16×2 LCD | |
For more details, visit: https://techzeero.com/arduino-tutorials/custom-characters-on-16x2-lcd/ | |
*/ | |
#include<LiquidCrystal.h> | |
LiquidCrystal lcd(12,11,5,4,3,2); | |
byte smile[8] = {0b00000,0b01010,0b00000,0b00000,0b10001,0b01110,0b00000,0b00000}; |
This file contains 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
/* | |
PIR motion sensor with Arduino | |
For more details, visit: https://techzeero.com/arduino-tutorials/pir-motion-sensor-with-arduino/ | |
*/ | |
int ledPin = 13; // Attach LED Pin | |
int sensorPin = 5; // Attach sensor out pin to Arduino D5 | |
void setup() { | |
pinMode(ledPin, OUTPUT); |
NewerOlder