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
Lua-Tutorial.pdf
1.2 MB
کتاب آموزش Lua

@micropython_iot
میکرو پایتون چیست ؟

یک نسخه از زبان برنامه نویسی پایتون با سرعت بالا می باشد که در برخی از میکروکنترلرها , ماژول های همچون esp8266 و.... مورد استفاده قرار می گیرد. هدف از این فریمور میکروپایتون ،استفاده از زبان برنامه نویسی پایتون در ابزارهای امبدد می باشد.

@micropython_iot
Micro-Python-Windows-setup.pdf
603 KB
استفاده از میکروپایتون و pyboard با ویندوز
@raspberry_python
pybv1.0b-front-trans


@micropython_iot
pinout. Pybv1.0

نمایش عملکرد پایه های pyboard

@micropython_iot
pinout pybv3
نمایش عملکرد پایه ها

@micropython_iot
PYBv4.pdf
1.7 MB
شماتیک pybv4

@micropython_iot
مینی کامپیوتر BBC micro:bit

@micropython_iot
لینک دانلود mu editor جهت نوشتن اسکریپت ، پروگرم کردن کردن میکروبیت و اتصال کامپیوتر به مینی کامپیوتر میکروبیت(نسخه ویندوز ، لینوکس)
http://codewith.mu/


@micropython_iot
مینی کامپیوتر میکروبیت

@micropython_iot
🌟دستورات کنترل عمومی pyboard


import pyb

pyb.repl_uart(pyb.UART(1, 9600))
# duplicate REPL on UART(1)

pyb.wfi()
# pause CPU, waiting for interrupt

pyb.freq()
# get CPU and bus frequencies

pyb.freq(60000000)
# set CPU freq to 60MHz

pyb.stop()
# stop CPU, waiting for external interrupt

@micropython_iot
ارتباط nodemcu با L35

@micropython_iot
اسکریپت Lua برای L35


Vref = 3.3
resolution = Vref/1023

analogVtg = adc.read(0)
if analogVtg> 1023 then
analogVtg = 1023
end
temperature = (analogVtg * resolution)*100
print('LM35 Temperature:', temperature)


@micropython_iot
نحوه ارتباط nodemcu با سنسور DHT11 (دما و رطوبت)

🆔 @micropython_iot
اسکریپت Lua برای DHT11

pin = 1

status, temp, humi, temp_dec, humi_dec = dht.read(pin)--read dht11 from pin

if status == dht.OK then —check status is ok and print temperature and humidity

print(string.format("DHT Temperature:%d.%03d;Humidity:%d.%03d",
math.floor(temp),
temp_dec,
math.floor(humi),
humi_dec
))

elseif status == dht.ERROR_CHECKSUM then —else print either status

print( "DHT Checksum error." )
elseif status ==
dht.ERROR_TIMEOUT then
print( "DHT timed out." )
end

🆔 @micropython_iot