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)
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)
BY Micropython & IOT
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. “This is how new coins are created” and new transactions are added to the blockchain, says Okoro.
Telegram hopes to raise $1bn with a convertible bond private placement
The super secure UAE-based Telegram messenger service, developed by Russian-born software icon Pavel Durov, is looking to raise $1bn through a bond placement to a limited number of investors from Russia, Europe, Asia and the Middle East, the Kommersant daily reported citing unnamed sources on February 18, 2021.The issue reportedly comprises exchange bonds that could be converted into equity in the messaging service that is currently 100% owned by Durov and his brother Nikolai.Kommersant reports that the price of the conversion would be at a 10% discount to a potential IPO should it happen within five years.The minimum bond placement is said to be set at $50mn, but could be lowered to $10mn. Five-year bonds could carry an annual coupon of 7-8%.