Micropython & IOT
1.63K subscribers
141 photos
1 video
47 files
36 links
ادمین : فرهاد ناصری زاده
@farhad_naserizadeh
@farhad3412

micropython, nodemcu, Lua, iot،
Arduino

کانال های مرتبط با این کانال

@raspberry_python
@c_micro
@ai_dsp
Download Telegram
void checkUpdate ()
{
Serial.print("Checking for firmware update... ");

t_httpUpdate_return ret = ESPhttpUpdate.update(
OTA_SERVER_HOST, OTA_SERVER_PORT, OTA_SERVER_PATH, FIRMWARE_VERSION
);

switch(ret) {
case HTTP_UPDATE_FAILED:
Serial.printf(
"Updated failed. Error (%d): %s\n",
ESPhttpUpdate.getLastError(),
ESPhttpUpdate.getLastErrorString().c_str()
);
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("No update found.");
break;
case HTTP_UPDATE_OK:
Serial.println("Updated OK. Rebooting.");
ESP.restart();
break;
}
}

@micropython_iot
from machine import Pin
from time import sleep
led = Pin(16, Pin.OUT)
while True:
led.high()
sleep(1)
led.low()
sleep(1)

gpio16 # D0

@micropython_iot
تولید سیگنال صوتی با صدای یکنواخت با پایتون

import numpy as np
import wave
import struct

freq = 440.0
data_size = 40000
fname = "High_A.wav"
frate = 11025.0
amp = 64000.0

sine_list_x = []
for x in range(data_size):
sine_list_x.append(np.sin(2*np.pi*freq*(x/frate)))

wav_file = wave.open(fname, "w")

nchannels = 1
sampwidth = 2
framerate = int(frate)
nframes = data_size
comptype = "NONE"
compname = "not compressed"

wav_file.setparams((nchannels, sampwidth, framerate, nframes,
comptype, compname))

for s in sine_list_x:
wav_file.writeframes(struct.pack('h', int(s*amp/2)))

wav_file.close()

@micropython_iot
ترسیم شکل موج فایل صوتی با پایتون
import matplotlib.pyplot as plt
import numpy as np
import wave
import sys

spf = wave.open('file name.wav','r')


signal = spf.readframes(-1)
signal = np.fromstring(signal, 'Int16')

plt.figure(1)
plt.title('Signal Wave...')
plt.plot(signal)
plt.show()

@micropython_iot
فیوزبیت.pdf
159.2 KB
فیوز بیت ها در AVR

@micropython_iot
Forwarded from C & micro & fpga (F.Naserizadeh)
Iot home automation

@c_micro
Forwarded from 🐍 Python & Raspberry 🐍 (F.Naserizadeh)
Raspbian OS Programming with the Raspberry Pi

کتاب جدید رزبری پای به همراه اینترنت اشیا 👇

🌟انتشار 2019🌟

🔰 @raspberry_python
Forwarded from 🐍 Python & Raspberry 🐍 (F.Naserizadeh)
Agus_Kurniawan_Raspbian_OS_Programming.pdf
9.7 MB
Raspbian OS Programming with the Raspberry Pi

کتاب جدید رزبری پای به همراه اینترنت اشیا

🌟انتشار 2019🌟

🔰 @raspberry_python
Hands-On ESP8266: Mastering Basic Peripherals

آموزش خوب برای esp8266 👇

🌟سال انتشار 2018🌟

🔰 @micropython_iot
Hands-On-ESP8266-Mastering-Basic-Peripherals.pdf
12.8 MB
Hands-On ESP8266: Mastering Basic Peripherals
(NodeMcu)

آموزش خوب برای esp8266

🌟سال انتشار 2018🌟

🔰 @micropython_iot
Particle Electron is a tiny Cellular(2G/3G) based development kit that can be used for creating connected projects and applications. It comes with a Particle SIM card with a data plan for low bandwidth applications.

#iot

@micropython_iot
Particle Photon is a very small Wi-Fi development kit which is designed for creating connected projects and applications for the Internet of Things(IoT). It has a powerful 120Mhz ARM Cortex M3 microcontroller with an on-board Broadcom Wi-Fi chip.

#iot

@micropython_iot
Pin Detail Diagram of Particle Photon


@micropython_iot
Forwarded from 🐍 Python & Raspberry 🐍 (F.Naserizadeh)
How to Use the MAX30100 as Arduino Heart Rate Sensor


https://www.teachmemicro.com/max30100-arduino-heart-rate-sensor/

🔰 @micropython_iot
🔰How to Build an RGB LED Circuit with an Arduino


const int redLED= 2;

const int greenLED= 4;

const int blueLED= 7;


void setup()
{

pinMode(redLED, OUTPUT);

pinMode(greenLED, OUTPUT);

pinMode(blueLED, OUTPUT);
}

void loop()
{
digitalWrite(redLED,HIGH);

delay(3000);

digitalWrite(redLED, LOW);

digitalWrite(greenLED,HIGH);

delay(3000);

digitalWrite(greenLED, LOW);

digitalWrite(blueLED, HIGH);

delay(3000);

digitalWrite(blueLED, LOW);
}

🆔 @micropython_iot
How to Connect an MCP23017 I/O Port Expander to an Arduino


@micropython_iot