Telegram Group & Telegram Channel
#میکرو_پایتون
#جلسه_دوم
راه اندازی LCDکاراکتری توسط میکروپایتون !

ابتدا کتابخانه Pyb را فراخوانی میکنیم
import pyb

سپس کتابخانه Lcd که توسط ما نوشته شده است را فراخوانی میکنید

From lcd import HD44780
یک فانکشن جهت راه اندازی lcd تعریف میکنیم :
def lcd_run():

یک متغیر به نام Lcd تعریف کرده و خروحی تابع HD44780 را درون آن بریزید

lcd=HD44780()

سپس Pin های دیتا Lcd که به برد متصل است را در تابع زیر به صورت زیر قرار دهید

lcd.PINS =['Y1','Y2','Y3','Y4','Y5','Y6']

جهت پیکره بندی Lcd تابع زیررا فراخوانی کنید
lcd.init()

جهت نمایش کاراکترها در سطر مورد مورد نظر از تابع زیر استفاده نمایید

lcd.set_line(x)
به جای سطر مورد نظر قرار دهید

جهت نوشتن یک رشته و کاراکتر از تابع زیر استفاده کنید

lcd.set_string("ABCDEFGHIJKLMNOP")

جهت پاکسازی صفحه از تابع زیر استفاده نمایید

lcd.clear()

و توسط تاخیر موجود در کتابخانه pyb یک تاخیر ۳۰۰۰ میلی ثانیه ای جهت ماندگاری و عدم پرش کاراکترها در صفحه Lcd ایجاد نمایید
pyb.delay(3000)

اسکریپت کامل 👇👇👇👇
#-
#--
#---
#------LCD Driver MicroPython-----
#------
#------Dev By Eng Meysam Mz----
#--------------
#----------------------
#-------------------------------
import pyb
from lcd import HD44780
def Lcd_Run():

lcd = HD44780()
lcd.PINS =['Y1','Y2','Y3','Y4','Y5','Y6']
lcd.init()
lcd.set_line(0)
lcd.set_string("Meysam MZ")
lcd.set_line(1)
lcd.set_string("Micro Py")
pyb.delay(3000)
lcd.clear()

# -----Help Connect Lcd -----
# 1 VSS GND GND
# 2 VDD +5V VCC
# 3 V0 Contrast (0-5V)* Pot
# 4 RS Register select pyboard, 0
# 5 R/W Read/write GND
# 6 E Enable pyboard, 1
# 7 DB0 Data Bit 0 NC
# 8 DB1 Data Bit 1 NC
# 9 DB2 Data Bit 2 NC
# 10 DB3 Data Bit 3 NC
# 11 DB4 Data Bit 4 pyboard, 2
# 12 DB5 Data Bit 5 pyboard, 3
# 13 DB6 Data Bit 6 pyboard, 4
# 14 DB7 Data Bit 7 pyboard, 5
# 15 A Backlight +someV VCC
# 16 K Backlight GND GND
#--------End Script-------#


@Raspberryproject
@Raspberry_Python
@micropython_iot



tg-me.com/micropython_iot/39
Create:
Last Update:

#میکرو_پایتون
#جلسه_دوم
راه اندازی LCDکاراکتری توسط میکروپایتون !

ابتدا کتابخانه Pyb را فراخوانی میکنیم
import pyb

سپس کتابخانه Lcd که توسط ما نوشته شده است را فراخوانی میکنید

From lcd import HD44780
یک فانکشن جهت راه اندازی lcd تعریف میکنیم :
def lcd_run():

یک متغیر به نام Lcd تعریف کرده و خروحی تابع HD44780 را درون آن بریزید

lcd=HD44780()

سپس Pin های دیتا Lcd که به برد متصل است را در تابع زیر به صورت زیر قرار دهید

lcd.PINS =['Y1','Y2','Y3','Y4','Y5','Y6']

جهت پیکره بندی Lcd تابع زیررا فراخوانی کنید
lcd.init()

جهت نمایش کاراکترها در سطر مورد مورد نظر از تابع زیر استفاده نمایید

lcd.set_line(x)
به جای سطر مورد نظر قرار دهید

جهت نوشتن یک رشته و کاراکتر از تابع زیر استفاده کنید

lcd.set_string("ABCDEFGHIJKLMNOP")

جهت پاکسازی صفحه از تابع زیر استفاده نمایید

lcd.clear()

و توسط تاخیر موجود در کتابخانه pyb یک تاخیر ۳۰۰۰ میلی ثانیه ای جهت ماندگاری و عدم پرش کاراکترها در صفحه Lcd ایجاد نمایید
pyb.delay(3000)

اسکریپت کامل 👇👇👇👇
#-
#--
#---
#------LCD Driver MicroPython-----
#------
#------Dev By Eng Meysam Mz----
#--------------
#----------------------
#-------------------------------
import pyb
from lcd import HD44780
def Lcd_Run():

lcd = HD44780()
lcd.PINS =['Y1','Y2','Y3','Y4','Y5','Y6']
lcd.init()
lcd.set_line(0)
lcd.set_string("Meysam MZ")
lcd.set_line(1)
lcd.set_string("Micro Py")
pyb.delay(3000)
lcd.clear()

# -----Help Connect Lcd -----
# 1 VSS GND GND
# 2 VDD +5V VCC
# 3 V0 Contrast (0-5V)* Pot
# 4 RS Register select pyboard, 0
# 5 R/W Read/write GND
# 6 E Enable pyboard, 1
# 7 DB0 Data Bit 0 NC
# 8 DB1 Data Bit 1 NC
# 9 DB2 Data Bit 2 NC
# 10 DB3 Data Bit 3 NC
# 11 DB4 Data Bit 4 pyboard, 2
# 12 DB5 Data Bit 5 pyboard, 3
# 13 DB6 Data Bit 6 pyboard, 4
# 14 DB7 Data Bit 7 pyboard, 5
# 15 A Backlight +someV VCC
# 16 K Backlight GND GND
#--------End Script-------#


@Raspberryproject
@Raspberry_Python
@micropython_iot

BY Micropython & IOT


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/micropython_iot/39

View MORE
Open in Telegram


Micropython & IOT Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Work?

Bitcoin is built on a distributed digital record called a blockchain. As the name implies, blockchain is a linked body of data, made up of units called blocks that contain information about each and every transaction, including date and time, total value, buyer and seller, and a unique identifying code for each exchange. Entries are strung together in chronological order, creating a digital chain of blocks. “Once a block is added to the blockchain, it becomes accessible to anyone who wishes to view it, acting as a public ledger of cryptocurrency transactions,” says Stacey Harris, consultant for Pelicoin, a network of cryptocurrency ATMs. Blockchain is decentralized, which means it’s not controlled by any one organization. “It’s like a Google Doc that anyone can work on,” says Buchi Okoro, CEO and co-founder of African cryptocurrency exchange Quidax. “Nobody owns it, but anyone who has a link can contribute to it. And as different people update it, your copy also gets updated.”

Export WhatsApp stickers to Telegram on Android

From the Files app, scroll down to Internal storage, and tap on WhatsApp. Once you’re there, go to Media and then WhatsApp Stickers. Don’t be surprised if you find a large number of files in that folder—it holds your personal collection of stickers and every one you’ve ever received. Even the bad ones.Tap the three dots in the top right corner of your screen to Select all. If you want to trim the fat and grab only the best of the best, this is the perfect time to do so: choose the ones you want to export by long-pressing one file to activate selection mode, and then tapping on the rest. Once you’re done, hit the Share button (that “less than”-like symbol at the top of your screen). If you have a big collection—more than 500 stickers, for example—it’s possible that nothing will happen when you tap the Share button. Be patient—your phone’s just struggling with a heavy load.On the menu that pops from the bottom of the screen, choose Telegram, and then select the chat named Saved messages. This is a chat only you can see, and it will serve as your sticker bank. Unlike WhatsApp, Telegram doesn’t store your favorite stickers in a quick-access reservoir right beside the typing field, but you’ll be able to snatch them out of your Saved messages chat and forward them to any of your Telegram contacts. This also means you won’t have a quick way to save incoming stickers like you did on WhatsApp, so you’ll have to forward them from one chat to the other.

Micropython & IOT from in


Telegram Micropython & IOT
FROM USA