Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 582
» Latest member: marco.morando@naisrl.com
» Forum threads: 396
» Forum posts: 1,932

Full Statistics

Online Users
There are currently 11 online users.
» 0 Member(s) | 10 Guest(s)
Google

Latest Threads
Move ESP32 Camera Project...
Forum: General
Last Post: lobo
11-27-2020, 10:25 AM
» Replies: 4
» Views: 1,526
gsm module integration in...
Forum: General
Last Post: Duality
11-26-2020, 07:13 AM
» Replies: 0
» Views: 22
Kendryte K210 port announ...
Forum: General
Last Post: mchobby
11-16-2020, 03:12 PM
» Replies: 16
» Views: 10,323
upip documentation and a ...
Forum: ESP32
Last Post: Corruptsector
11-10-2020, 07:11 AM
» Replies: 1
» Views: 1,529
NOOB Needs Help with ESP3...
Forum: ESP32
Last Post: Corruptsector
11-10-2020, 06:27 AM
» Replies: 1
» Views: 394
ESP32 LoBo PID controller
Forum: ESP32
Last Post: Corruptsector
11-09-2020, 10:02 AM
» Replies: 0
» Views: 54
Modbus on ESP32
Forum: Issues
Last Post: panilsunil
11-03-2020, 03:21 AM
» Replies: 1
» Views: 417
flash voltage selection e...
Forum: ESP32
Last Post: LoriNagle
09-18-2020, 03:35 PM
» Replies: 4
» Views: 2,020
project is dormant?
Forum: General
Last Post: Sang15512
09-03-2020, 06:53 AM
» Replies: 28
» Views: 10,210
Power Management
Forum: General
Last Post: Simranto09
09-02-2020, 03:15 PM
» Replies: 4
» Views: 79,033

 
  gsm module integration in the micropython port
Posted by: Duality - 11-26-2020, 07:13 AM - Forum: General - No Replies

<p>Hi All,</p><p><br></p><p>Lobo port provides very efficient gsm module implementation. I want to integrate this module in the micropython port for esp32 from micropython.org. I have tried several times. Each time I get this error.&nbsp;</p><p><br></p><p>

<br></p><p>build-GENERIC/py/objmodule.oSad.rodata.mp_builtin_module_table+0x134): undefined reference to `gsm_module'<br></p><p>Makefile:781: recipe for target 'build-GENERIC/application.elf' failed<br>make: *** [build-GENERIC/application.elf] Error 1</p><p>

<!--StartFragment--><span style="color: rgb(51, 51, 51); font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
</span><!--EndFragment-->

<br></p><p><br></p><p>Has anyone tried this? Can it be done?</p><p><br></p><p>Sincerely&nbsp;</p>

Print this item

  ESP32 LoBo PID controller
Posted by: Corruptsector - 11-09-2020, 10:02 AM - Forum: ESP32 - No Replies

<p>Hey Guys,</p><p><br></p><p>Sorry if this is a stupid question, but i am trying to find a PID controller for my ESP32. <br></p><p><br></p><p>I can find references around the place but nothing like a complete PID library.</p><p><br></p><p>Any help appreciated.<br></p><p><br></p>

Print this item

  Modbus on ESP32
Posted by: Duality - 10-02-2020, 06:43 AM - Forum: Issues - Replies (1)

<p>Hi All,</p><p><br></p><p>I am using esp32 with lobo uPython. Can anyone suggest library to implement modbus on ESP32 or anywork around&nbsp;?</p><p><br></p><p>I have tried this:</p><p><br></p><p>Connections: ESP32 -&gt; SP3485 breakout board (from [sparkfun](https://www.digikey.in/product-detail/en...gLvO_D_BwE)) connected to tx=17,rx=16 (also supply 3.3v to the breakout board)&nbsp;-&gt; USB to RS485 converter -&gt; PC (runs Modbus master or Modbus slave simulator). However, I didn't&nbsp;get request from (Modbus master software from PC).&nbsp;</p><p><br></p><p>The small code, I have written to get and send request is this:</p><p><br></p><p>

<!--StartFragment--></p><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #c586c0;">from</span><span style="color: #d4d4d4;">&nbsp;machine&nbsp;</span><span style="color: #c586c0;">import</span><span style="color: #d4d4d4;">&nbsp;UART</span></div><div><span style="color: #c586c0;">import</span><span style="color: #d4d4d4;">&nbsp;functions</span></div><div><span style="color: #c586c0;">import</span><span style="color: #d4d4d4;">&nbsp;machine,&nbsp;time</span></div><div><span style="color: #c586c0;">import</span><span style="color: #d4d4d4;">&nbsp;const</span></div><div><span style="color: #6a9955;">#&nbsp;16bit&nbsp;CRC&nbsp;-&gt;&nbsp;8&nbsp;byte:&nbsp;addr,&nbsp;fc,&nbsp;00,register_addr,00,number&nbsp;of&nbsp;registers&nbsp;to&nbsp;read,CRC&nbsp;LSB,&nbsp;CRC&nbsp;MSB</span></div><br><div><span style="color: #6a9955;">#setup&nbsp;serial&nbsp;connection&nbsp;</span></div><div><span style="color: #569cd6;">def</span><span style="color: #d4d4d4;">&nbsp;</span><span style="color: #dcdcaa;">send_receive</span><span style="color: #d4d4d4;">(</span><span style="color: #9cdcfe;">pdu</span><span style="color: #d4d4d4;">):</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;ctrl_pin.value(</span><span style="color: #b5cea8;">1</span><span style="color: #d4d4d4;">)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;time.sleep(</span><span style="color: #b5cea8;">0.1</span><span style="color: #d4d4d4;">)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;uart.write(pdu)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #c586c0;">while</span><span style="color: #d4d4d4;">&nbsp;</span><span style="color: #569cd6;">True</span><span style="color: #d4d4d4;">:</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time.sleep(</span><span style="color: #b5cea8;">0.1</span><span style="color: #d4d4d4;">)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctrl_pin.value(</span><span style="color: #b5cea8;">0</span><span style="color: #d4d4d4;">)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #dcdcaa;">print</span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">'received:&nbsp;'</span><span style="color: #d4d4d4;">,&nbsp;uart.read())</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time.sleep(</span><span style="color: #b5cea8;">0.1</span><span style="color: #d4d4d4;">)</span></div><br><div><span style="color: #569cd6;">def</span><span style="color: #d4d4d4;">&nbsp;</span><span style="color: #dcdcaa;">create_req_pdu</span><span style="color: #d4d4d4;">(</span><span style="color: #9cdcfe;">slave_addr</span><span style="color: #d4d4d4;">,</span><span style="color: #9cdcfe;">fc</span><span style="color: #d4d4d4;">,</span><span style="color: #9cdcfe;">register_addr</span><span style="color: #d4d4d4;">,&nbsp;</span><span style="color: #9cdcfe;">register_count</span><span style="color: #d4d4d4;">):</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu&nbsp;=&nbsp;</span><span style="color: #4ec9b0;">bytearray</span><span style="color: #d4d4d4;">()</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu.append(slave_addr)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu.append(fc)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu.append(</span><span style="color: #569cd6;">0x</span><span style="color: #b5cea8;">00</span><span style="color: #d4d4d4;">)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu.append(register_addr)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu.append(</span><span style="color: #569cd6;">0x</span><span style="color: #b5cea8;">00</span><span style="color: #d4d4d4;">)</span></div><br><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu.append(register_count)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;pdu.extend(functions.calculate_crc16(pdu))</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #dcdcaa;">print</span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">'request&nbsp;pdu:&nbsp;'</span><span style="color: #d4d4d4;">,&nbsp;pdu)</span></div><div><span style="color: #d4d4d4;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #c586c0;">return</span><span style="color: #d4d4d4;">&nbsp;pdu</span></div></div><!--EndFragment-->

<p></p><p><br></p><p>Please suggest, if anything else I need to try.</p><p><br></p><p>Thanks and regards.</p>

Print this item

  Problem with AXP202 Library
Posted by: thiago.nogueira - 08-22-2020, 01:32 PM - Forum: Issues - No Replies

<p>Hello guys!<br><br>I have a problem using the AXP202 library. I have a TTGO-T-Beam 1.0 and I am starting to use it in my first micropython project.<br><br>First of all I would like to simply blink the LED and I couldn't do it anymore.<br><br>I'm using VSCode with pymakr and was able to install the esp32_psram_all_bt firmware.<br><br>I would like to use this library: https://github.com/lewisxhe/AXP202_PythonLibrary but I'm not sure how (as I said, it is my first project). I don't know if I need to download and place these files in a specific folder.<br><br>I downloaded these files and put them in a folder and tried to run main.py but this error appeared: OSError: I2C bus error. I don't know what else to do, any help is welcome.<br><br>Thank you very much in advance.<br></p>

Print this item

  ulab Samples - FFT benchmark with Sipeed MAixBiT in 1st place
Posted by: ph.robadel - 08-13-2020, 02:14 AM - Forum: General - No Replies

<p data-sourcepos="213:1-213:252" dir="auto"><a href="https://github.com/ph-robadel/ulab_samples" rel="nofollow noreferrer noopener" target="_blank">ulab Samples</a> is a repository with links, examples, benchmarks, etc, about <a href="https://github.com/v923z/micropython-ulab" rel="nofollow noreferrer noopener" target="_blank">ulab module</a>, a NumPy-like array manipulation library for MicroPython and CircuitPython.<br><br></p>
<p data-sourcepos="215:1-215:347" dir="auto">Most interesting is the <a href="https://github.com/ph-robadel/ulab_samples#benchmark-of-fft-with-1024-points" rel="nofollow noreferrer noopener" target="_blank"><strong>ulab FFT benchmark for 1024 points</strong></a>, where you can see, among other boards, the performance of <strong>Sipeed MAix BiT with MicroPython for K210 Lobo firmware</strong> : it <strong>is a clear winner in double precision (FP64) FFT</strong>, taking only <strong>1.030 ms</strong> !</p>
<p data-sourcepos="217:1-217:408" dir="auto">Sipeed MAix BiT with RISC-V 64bit Kendryte K210 has double precision (FP64) float point hardware support, and MicroPython for K210 Lobo firmware is currently only for double precision (FP64). But it would be very useful to have MicroPython for K210 Lobo firmware in two versions, one in single precision (FP32) and another in double precision (FP64), so the K210 microcontroller can show all its performance.<br><br></p>
<p data-sourcepos="219:1-219:100" dir="auto">See more <a href="https://github.com/ph-robadel/ulab_samples#analyses" rel="nofollow noreferrer noopener" target="_blank">comments in ulab Samples repository</a>.</p><p class="sceditor-nlf"><br></p>

Print this item

  TTGO ESP TDisplay - Not Working
Posted by: aualby - 08-08-2020, 02:46 PM - Forum: Issues - Replies (1)

<p>I am using&nbsp;<font color="#aaaaaa">MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32</font> on a TTGO ESP32 TDisplay board. Have modified the example as below to suit the pins. All I get is the back light comes on for a second then goes off. No errors. Have wasted a full day on it so far. Please help..... ripping my hair out.</p><p><br></p><p>

Code:
"""
Demo program demonstrating the capabities of the MicroPython display module
Author: LoBo (https://github/loboris)
Date:   08/10/2017

"""

import machine, display, time, math

tft = display.TFT()

# ESP32-WROVER-KIT v3:
#tft.init(tft.ST7789, rst_pin=18, backl_pin=5, miso=25, mosi=23, clk=19, cs=22, dc=21)

# Adafruit:
#tft.init(tft.ILI9341, width=240, height=320, miso=19, mosi=18, clk=5, cs=15, dc=33, bgr=True, hastouch=tft.TOUCH_STMPE, tcs=32)

# M5Stack:
#tft.init(tft.M5STACK, width=240, height=320, rst_pin=33, backl_pin=32, miso=19, mosi=23, clk=18, cs=14, dc=27, bgr=True, backl_on=1, invrot=3)

# TTGO TDisplay
tft.init(tft.ST7789, rst_pin=23, backl_pin=4, miso=0, mosi=19, clk=18, cs=5, dc=16)

# Others...
#tft.init(tft.ILI9341, width=240, height=320, miso=19,mosi=23,clk=18,cs=5,dc=26,tcs=27,hastouch=True, bgr=True)
#tft.init(tft.ST7735R, speed=10000000, spihost=tft.HSPI, mosi=13, miso=12, clk=14, cs=15, dc=27, rst_pin=26, hastouch=False, bgr=False, width=128, height=160)


def testt():
    while True:
        lastx = 0
        lasty = 0
        t,x,y = tft.gettouch()
        if t:
            dx = abs(x-lastx)
            dy = abs(y-lasty)
            if (dx &gt; 2) and (dy &gt; 2):
                tft.circle(x,y,4,tft.RED)
        time.sleep_ms(50)


maxx = 135
maxy = 240
miny = 12
touch = False

# fonts used in this demo
fontnames = (
    tft.FONT_Default,
    tft.FONT_7seg,
    tft.FONT_Ubuntu,
    tft.FONT_Comic,
    tft.FONT_Tooney,
    tft.FONT_Minya
)


# Check if the display is touched
#-------------
def touched():
    if not touch:
        return False
    else:
        tch,_,_ = tft.gettouch()
        if tch &lt;= 0:
            return False
        else:
            return True

# print display header
#----------------------
def header(tx, setclip):
    # adjust screen dimensions (depends on used display and orientation)
    global maxx, maxy, miny

    maxx, maxy = tft.screensize()
    tft.clear()
    if maxx &lt; 240:
        tft.font(tft.FONT_Small, rotate=0)
    else:
        tft.font(tft.FONT_Default, rotate=0)
    _,miny = tft.fontSize()
    miny += 5
    tft.rect(0, 0, maxx-1, miny-1, tft.OLIVE, tft.DARKGREY)
    tft.text(tft.CENTER, 2, tx, tft.CYAN, transparent=True)

    if setclip:
        tft.setwin(0, miny, maxx, maxy)

# Display some fonts
#-------------------
def dispFont(sec=5):
    header("DISPLAY FONTS", False)

    if maxx &lt; 240:
        tx = "MicroPython"
    else:
        tx = "Hi from MicroPython"
    starty = miny + 4

    n = time.time() + sec
    while time.time() &lt; n:
        y = starty
        x = 0
        i = 0
        while y &lt; maxy:
            if i == 0:
                x = 0
            elif i == 1:
                x = tft.CENTER
            elif i == 2:
                x = tft.RIGHT
            i = i + 1
            if i &gt; 2:
                i = 0
            
            for font in fontnames:
                if font == tft.FONT_7seg:
                    tft.font(font)
                    tft.text(x,y,"-12.45/",machine.random(0xFFFFFF))
                else:
                    tft.font(font)
                    tft.text(x,y,tx, machine.random(0xFFFFFF))
                _,fsz = tft.fontSize()
                y = y + 2 + fsz
                if y &gt; (maxy-fsz):
                    y = maxy
        if touched():
            break

# Display random fonts
#------------------------------
def fontDemo(sec=5, rot=False):
    tx = "FONTS"
    if rot:
        tx = "ROTATED " + tx
    header(tx, True)

    tx = "ESP32-MicrpPython"
    n = time.time() + sec
    while time.time() &lt; n:
        frot = 0
        if rot:
            frot = math.floor(machine.random(359)/5)*5
        for font in fontnames:
            if (not rot) or (font != tft.FONT_7seg):
                x = machine.random(maxx-8)
                if font != tft.FONT_7seg:
                    tft.font(font, rotate=frot)
                    _,fsz = tft.fontSize()
                    y = machine.random(miny, maxy-fsz)
                    tft.text(x,y,tx, machine.random(0xFFFFFF))
                else:
                    l = machine.random(6,12)
                    w = machine.random(1,l // 3)
                    tft.font(font, rotate=frot, dist=l, width=w)
                    _,fsz = tft.fontSize()
                    y = machine.random(miny, maxy-fsz)
                    tft.text(x,y,"-12.45/", machine.random(0xFFFFFF))
        if touched():
            break
    tft.resetwin()

# Display random lines
#-------------------
def lineDemo(sec=5):
    header("LINE DEMO", True)

    n = time.time() + sec
    while time.time() &lt; n:
        x1 = machine.random(maxx-4)
        y1 = machine.random(miny, maxy-4)
        x2 = machine.random(maxx-1)
        y2 = machine.random(miny, maxy-1)
        color = machine.random(0xFFFFFF)
        tft.line(x1,y1,x2,y2,color)
        if touched():
            break
    tft.resetwin()

# Display random circles
#----------------------------------
def circleDemo(sec=5,dofill=False):
    tx = "CIRCLE"
    if dofill:
        tx = "FILLED " + tx
    header(tx, True)

    n = time.time() + sec
    while time.time() &lt; n:
        color = machine.random(0xFFFFFF)
        fill = machine.random(0xFFFFFF)
        x = machine.random(4, maxx-2)
        y = machine.random(miny+2, maxy-2)
        if x &lt; y:
            r = machine.random(2, x)
        else:
            r = machine.random(2, y)
        if dofill:
            tft.circle(x,y,r,color,fill)
        else:
            tft.circle(x,y,r,color)
        if touched():
            break
    tft.resetwin()

#------------------
def circleSimple():
    tx = "CIRCLE"
    header(tx, True)

    x = 110
    y = 160
    r = 110
    z = 0
    while z &lt; 12:
        color = machine.random(0xFFFFFF)
        fill = machine.random(0xFFFFFF)
        tft.circle(x,y,r,color,fill)
        r -= 10
        x += 10
        z += 1

# Display random ellipses
#-----------------------------------
def ellipseDemo(sec=5,dofill=False):
    tx = "ELLIPSE"
    if dofill:
        tx = "FILLED " + tx
    header(tx, True)

    n = time.time() + sec
    while time.time() &lt; n:
        x = machine.random(4, maxx-2)
        y = machine.random(miny+2, maxy-2)
        if x &lt; y:
            rx = machine.random(2, x)
        else:
            rx = machine.random(2, y)
        if x &lt; y:
            ry = machine.random(2, x)
        else:
            ry = machine.random(2, y)
        color = machine.random(0xFFFFFF)
        if dofill:
            fill = machine.random(0xFFFFFF)
            tft.ellipse(x,y,rx,ry,15, color,fill)
        else:
            tft.ellipse(x,y,rx,ry,15,color)
        if touched():
            break
    tft.resetwin()

# Display random rectangles
#---------------------------------
def rectDemo(sec=5, dofill=False):
    tx = "RECTANGLE"
    if dofill:
        tx = "FILLED " + tx
    header(tx, True)

    n = time.time() + sec
    while time.time() &lt; n:
        x = machine.random(4, maxx-2)
        y = machine.random(miny, maxy-2)
        w = machine.random(2, maxx-x)
        h = machine.random(2, maxy-y)
        color = machine.random(0xFFFFFF)
        if dofill:
            fill = machine.random(0xFFFFFF)
            tft.rect(x,y,w,h,color,fill)
        else:
            tft.rect(x,y,w,h,color)
        if touched():
            break
    tft.resetwin()

# Display random rounded rectangles
#--------------------------------------
def roundrectDemo(sec=5, dofill=False):
    tx = "ROUND RECT"
    if dofill:
        tx = "FILLED " + tx
    header(tx, True)

    n = time.time() + sec
    while time.time() &lt; n:
        x = machine.random(2, maxx-18)
        y = machine.random(miny, maxy-18)
        w = machine.random(12, maxx-x)
        h = machine.random(12, maxy-y)
        if w &gt; h:
            r = machine.random(2, h // 2)
        else:
            r = machine.random(2, w // 2)
        color = machine.random(0xFFFFFF)
        if dofill:
            fill = machine.random(0xFFFFFF)
            tft.roundrect(x,y,w,h,r,color,fill)
        else:
            tft.roundrect(x,y,w,h,r,color)
        if touched():
            break
    tft.resetwin()
<br></p>

Print this item

  NOOB Needs Help with ESP32 TTGO Display
Posted by: Gman - 07-28-2020, 02:42 AM - Forum: ESP32 - Replies (1)

<p>Hi, Guys,</p><p><br></p><p>Got ESP32 TTGO Oled board. Installed Lobo Firmware!</p><p><p style="white-space: pre-wrap; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; margin: 0px;">MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32<br>Started playing with display module and stuck as Can't find how to increase text size &amp; change the font:<br><br></p>import machine, display, time, math, network, utime<br><br>tft = display.TFT()<br>tft.init(<br>&nbsp; &nbsp; tft.ST7789,<br>&nbsp; &nbsp; bgr=False,<br>&nbsp; &nbsp; rot=tft.LANDSCAPE,<br>&nbsp; &nbsp; miso=17,<br>&nbsp; &nbsp; backl_pin=4,<br>&nbsp; &nbsp; backl_on=1,<br>&nbsp; &nbsp; mosi=19,<br>&nbsp; &nbsp; clk=18,<br>&nbsp; &nbsp; cs=5,<br>&nbsp; &nbsp; dc=16,<br>)<br><br><br><br>tft.setwin(40,52,320,240)<br>for i in range(0, 240):<br> color = 0xFFF000<br> tft.line(i, 0, i, 135, color)<br><br>tft.set_fg(0x000000)<br><br>#tft.ellipse(120, 67, 120, 67)<br><br>#tft.line(0, 0, 220, 135)<br><br>text = "XXXXXXXXXXXX!"<br><br><br>tft.text(<br>&nbsp; &nbsp; 120 - int(tft.textWidth(text) / 2), 65 - int(tft.fontSize() [1] / 2), text, 0xFFFFFF<br>)<br><br></p>

Print this item

  SD
Posted by: nogleo - 07-27-2020, 07:57 PM - Forum: Hardware - Replies (3)

<p>I've been meaning to use in my project sd storage and the ADCs on my Maixduino borad&nbsp;but looks like it's not possible for the esp32 and the sd slot pins are shared.</p><p>I'd like to know if it is possible for me to mount sd through an adaptor on other pins so I can use it all simultaneously.</p><p>And code-wise how should I do it? SPI?</p><p><br></p><p><br></p><p>help please and thanks in advance Smile</p>

Print this item

  Small modification to curl FTP module
Posted by: panilsunil - 07-25-2020, 05:38 AM - Forum: Ideas - No Replies

<p>A small modification implemented to CURL FTP module.</p><p>1. FTP Put command to send data directly from buffer instead of File. This helps in reducing the File I/O on flash memory.&nbsp;</p><p>&nbsp;(modified ftp_put to read from buffer instead of file)</p><p></p><pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 13.6px; margin-top: 0px; margin-bottom: 0px; overflow-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 6px; word-break: normal; color: rgb(36, 41, 46); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><span class="pl-s1" style="box-sizing: border-box;">res</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">=</span><span class="pl-s1" style="box-sizing: border-box;">curl</span>.<span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">ftp_put_buf</span>(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">'ftp://loboris.eu/test/uploaded_boot.py'</span>,<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">'esp32'</span>,<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">'esp32user'</span>, <span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">buffer</span>)</pre><!--EndFragment-->

<p></p><p class="sceditor-nlf">2. FTP List gets all files info from server. A provision is made to check if a single file exists in server by getting only its attributes and no file body is downloaded.<br>&nbsp;(modified ftp_get to exclude body)<br><br>

<!--StartFragment--></p><pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; font-size: 13.6px; margin-top: 0px; margin-bottom: 0px; overflow-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 6px; word-break: normal; color: rgb(36, 41, 46); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><span class="pl-s1" style="box-sizing: border-box;">res</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">=</span><span class="pl-s1" style="box-sizing: border-box;">curl</span>.<span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">ftp_get_info</span>(<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">'ftp://loboris.eu/ftptest.txt'</span>,<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">'esp32'</span>,<span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">'esp32user'</span>)<br></pre><p></p><p class="sceditor-nlf">esp32/modcurl.c and esp32/libs/espcurl.c files attached.&nbsp;<br>This is a small work and requested to verify and comment.<br><br></p>



Attached Files
.zip   curl_mod.zip (Size: 15.33 KB / Downloads: 0)
Print this item

  irq not work
Posted by: alien1983 - 07-13-2020, 03:20 AM - Forum: MicroPython - Replies (1)

<p>Hi,</p><p>The interruption/callback does not work for me...</p><p><br></p><p>

</p><p>def callback(p):<br>&nbsp; &nbsp; print('pin change', p)</p><p>
<!--StartFragment-->
<!--EndFragment-->&nbsp;</p><p><br></p><p>
<!--StartFragment-->
<!--EndFragment-->

<br></p><p>p0 = machine.Pin(0, machine.Pin.IN, machine.Pin.PULL_UP, handler=callback('p0'), trigger=machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)<br></p><p>
</p><p><br></p><p>During start, the function starts once "<!--StartFragment-->callback<!--EndFragment-->()"</p><p><br></p><p>The Prog button (Pin 0) does not respond to
<!--StartFragment-->callback<!--EndFragment--> function.<br></p>

Print this item