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 برای ارتباط 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
ارتباط nodemcu با سنسور pir

🆔 @micropython_iot
اسکریپت Lua برای سنسور PIR

PIRpin = 1
LEDpin = 4

gpio.mode(PIRpin, gpio.INPUT)
gpio.mode(LEDpin, gpio.OUTPUT)

while true do
gpio.write(LEDpin, gpio.read(PIRpin))
tmr.delay(10000)
end

🆔 @micropython_iot
Forwarded from 🐍 Python & Raspberry 🐍 (F.Naserizadeh)
آی سی mcp23017 افزاینده Gpio

رابط i2c

کاربردی

🆔 @raspberry_python
❇️ @raspberryproject
Forwarded from Micropython & IOT (F.Naserizadeh)
micropython.pdf
1.2 MB
🌟documentation micropython

🆔 @micropython_iot
ارتباط IR میان دو عدد NODEMCU

🔰 @micropython_iot
❇️ اسکریپت Lua سمت فرستنده
count = 0

-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo

uart.setup(0,1200,8,0,1,1)

while true do -- continuous send count
print(count)
count = count + 1

tmr.delay(1000000)
end

❇️ اسکریپت Lua سمت گیرنده

-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo

uart.setup(0,1200,8,0,1,1)


--print received data

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

🔰 @micropython_iot
ارتباط استپ موتور با nodemu

🔰 @micropython_iot
steppermotor.txt
1.7 KB
اسکریپت lua برای استپ موتور

🔰 @micropython_iot
دانلود آخرین ورژن فریمور استاندارد برای pyboard V1.0

http://micropython.org/resources/firmware/pybv10-20180809-v1.9.4-443-gc1c798fbc.dfu

🆔 @micropython_iot
دانلود آخرین ورژن فریمور استاندارد برای pyboard V1.1

http://micropython.org/resources/firmware/pybv11-20180809-v1.9.4-443-gc1c798fbc.dfu

🆔 @micropython_iot
Using Adafruit's motor shield V2 with a pyboard

http://wdi.supelec.fr/boulanger/MicroPython/AdafruitMotorShield

🔰 @micropython_iot
کانال میکروکنترلر و زبان C

🆔 @c_micro