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
lcd.py
2.9 KB
کتابخانه راه اندازی Lcd کاراکتری میکروپایتون

@Raspberryproject
@Raspberry_Python
@micropython_iot
نحوه ارتباط nodemcu با ماژول بلوتوث HC_05
@micropython_iot
اسکریپت Lua برای ماژول بلوتوث

LEDpin = 4

gpio.mode(LEDpin, gpio.OUTPUT)--set LED pin as output pin
gpio.write(LEDpin, gpio.LOW)— set LED state initially low

—begin uart with specs
uart.setup(0, 9600, 8, uart.PARITY_NONE, uart.STOPBITS_1, 1)
—set callback function on receive to make decision about LED on/off
uart.on("data",1,
function(data)
if(data == "1") then
gpio.write(LEDpin, gpio.HIGH)
print("LED ON")
elseif(data == "2") then
gpio.write(LEDpin, gpio.LOW)
print("LED OFF")
else
print("select proper option")
end
end, 0)

نکته : پسورد دیفالت ماژول بلوتوث برای اتصال 0000 یا 1234 می باشد.

@micropython_iot
#جلسه_سوم
#میکرو_پایتون

راه اندازی ADC در میکرو پایتون!

جهت راه اندازی ADC (مبدل انالوگ به دیجیتال )

ابتدا کتابخانه Machine را فراخواتی میکنیم .

import machine

سپس پین adc مربوط به برد میکروپایتون خود را شناسایی کرده و آنرا در دستور زیر قرار دهید

adc=machine.ADC(machine.Pin(Pin number))

به جای عبارت Pin number شماره پین Adc برد خودرا وارد نمایید

و حال تابع adc.read را به نمایش بگذارید

Print(adc.read())

در نتیجه نسبت به ولتاژ وارده به پین که بین ۰ تا ۳.۳ باید باشد و اگر ولتاژ بالاتری از این حد دارید با تقسیم مقاومتی باید این ولتاژ را به ۳.۳ رسانده و به پین اعمال کنید . مقدار دیجیتال شده ولتاژ انالوگ‌ وارده را مشاهده میکنید .


اسکریپت کامل 👇👇👇

#Micro Python ADC
#----------------------------------------
#Dev By Eng Meysam Mz
#----------------------------------------
#----------------
import machine
Import time

adc=machine.ADC(machine.Pin(36))

While 1:
print(adc.read())
time.sleep(1)

#-----------------

@Raspberryproject
@Raspberry_Python
@micropython_iot
پین های uart ماژول nodemcu

@micropython_iot
ارتباط سریال (uart) بین دو ماژول nodemcu
@micropython_iot
@raspberry_python
@raspberryproject
🌟اسکریپت Lua برای ماژول فرستنده nodemcu

uart.setup(1, 115200, 8, uart.PARITY_NONE, uart.STOPBITS_1, 1) — setup UART1 i.e. pin GPIO2

while true do —send string per second continuously

uart.write(1, "Hello friend\n")
tmr.delay(1000000)
end

🌟اسکریپت Lua برای ماژول گیرنده nodemcu

—callback on receiver data
uart.on("data","\n",function(data) print("receive from uart:", data) end, 0)

@micropython_iot
@raspberry_python
@raspberryproject
پروگرم کردن مینی کامپیوتر میکروبیت

شروع با میکروپایتون 👇

🌟سال 2018

@micropython_iot
Monk,_Simon_Programming_the_BBC.pdf
10.2 MB
پروگرم کردن مینی کامپیوتر میکروبیت

شروع با میکروپایتون

🌟سال 2018

@micropython_iot
Getting Started with the ESPlorer IDE - Rui Santos.pdf
1.1 MB
Getting Started with the ESPlorer IDE

@micropython_iot
Forwarded from C & micro & fpga
Programming
PIC Microcontrollers with XC8👇
🌟2018

@c_micro
Forwarded from C & micro & fpga
Armstrong_Subero_auth_Programming.pdf
5.4 MB
Programming
PIC Microcontrollers with XC8

🌟2018

@c_micro
Forwarded from C & micro & fpga
آموزش اتصال آردوینو به تلگرام.pdf
21.9 MB
آموزش اتصال آردوینو به تلگرام و کنترل رله👌
⚡️این جزوه در 60 صفحه تهیه شده است و دارای تصاویر از جزییات کار می باشد⚡️
@c_micro
ارتباط nodemcu با oled

@micropython_iot
اسکریپت Lua برای ارتباط nodemcu و oled


sda = 2 — SDA Pin
scl = 1 — SCL Pin

s=0
m=0
h=0

function init_OLED(sda,scl) —Set up the u8glib lib
sla = 0x3C
i2c.setup(0, sda, scl, i2c.SLOW)
disp = u8g.ssd1306_128x64_i2c(sla)
disp:setFont(u8g.font_6x10)
disp:setFontRefHeightExtendedText()
disp:setDefaultForegroundColor()
disp:setFontPosTop()
—disp:setRot180() — Rotate Display if needed
end

function write_OLED() — Write Display
disp:firstPage()
repeat
disp:drawStr(50, 10, "Timer")
disp:drawStr(40, 30, string.format("%02d:%02d:%02d",h,m,s))
disp:drawStr(20, 50, "hello")
until disp:nextPage() == false
end

— Main Program
init_OLED(sda,scl)

tmr.alarm(0, 1000, 1, function() — Every second increment clock and display
s = s+1
if s==60 then
s=0
m=m + 1
end
if m==60 then
m=0
h=h + 1
end
if h==13 then
h=1
end
write_OLED()
end)
Micropython & IOT pinned Deleted message
pyboard

L293D

@micropython_iot
micropython.pdf
1.2 MB
🌟documentation micropython

🆔 @micropython_iot
Forwarded from C & micro & fpga
🌟🌟 مرجع کامل stm32👇
🌟2016

@c_micro
Forwarded from C & micro & fpga
Carmine Noviello - Mastering STM32 (2016, Leanpub).pdf
64 MB
🌟🌟 مرجع کامل stm32
🌟2016

🆔 @c_micro