Shop OBEX P1 Docs P2 Docs Learn Events
Propforth v5.5 is available for download - Page 24 — Parallax Forums

Propforth v5.5 is available for download

12021222426

Comments

  • caskazcaskaz Posts: 957
    edited 2017-02-20 11:22
    Hi.
    I try to operate webserver on ESP-WROOM-02(ESP8266).
    Webpage display on client PC.
    But it take much time(3minutes).

    Client PC Linux 192.168.1.3
    Windows8.1 192.168.1.118
    ESP-WROOM-02 192.168.1.11

    Both Pc is same result.

    I attached text from ESP-WROOM-02 below;

    Why webpage take 3 minuts?
    Any advise please.
    
    26 characters
    
    19_356 00_026:
    19_356: 065 084 043 067 073 080 083 069 082 086 069 082 061 049 044 056   AT+CIPSERVER=1,8
    19_372: 048 013 013 010 013 010 079 075 013 010 057 050 046 049 054 056   0.....OK..92.168
    AT+CIPSERVER=1,80
    
    
    
    
    OK
             ---- Access from browser to 192.168.1.11 ----
    
    304 characters
    
    19_356 00_304:
    19_356: 048 044 067 079 078 078 069 067 084 013 010 013 010 043 073 080   0,CONNECT....+IP
    19_372: 068 044 048 044 050 056 048 058 071 069 084 032 047 032 072 084   D,0,280:GET / HT
    19_388: 084 080 047 049 046 049 013 010 072 111 115 116 058 032 049 057   TP/1.1..Host: 19
    19_404: 050 046 049 054 056 046 049 046 049 049 013 010 085 115 101 114   2.168.1.11..User
    19_420: 045 065 103 101 110 116 058 032 077 111 122 105 108 108 097 047   -Agent: Mozilla/
    19_436: 053 046 048 032 040 088 049 049 059 032 076 105 110 117 120 032   5.0 (X11; Linux
    19_452: 105 054 056 054 059 032 114 118 058 051 051 046 048 041 032 071   i686; rv:33.0) G
    19_468: 101 099 107 111 047 050 048 049 048 048 049 048 049 032 070 105   ecko/20100101 Fi
    19_484: 114 101 102 111 120 047 051 051 046 048 013 010 065 099 099 101   refox/33.0..Acce
    19_500: 112 116 058 032 116 101 120 116 047 104 116 109 108 044 097 112   pt: text/html,ap
    19_516: 112 108 105 099 097 116 105 111 110 047 120 104 116 109 108 043   plication/xhtml+
    19_532: 120 109 108 044 097 112 112 108 105 099 097 116 105 111 110 047   xml,application/
    19_548: 120 109 108 059 113 061 048 046 057 044 042 047 042 059 113 061   xml;q=0.9,*/*;q=
    19_564: 048 046 056 013 010 065 099 099 101 112 116 045 076 097 110 103   0.8..Accept-Lang
    19_580: 117 097 103 101 058 032 101 110 045 085 083 044 101 110 059 113   uage: en-US,en;q
    19_596: 061 048 046 053 013 010 065 099 099 101 112 116 045 069 110 099   =0.5..Accept-Enc
    19_612: 111 100 105 110 103 058 032 103 122 105 112 044 032 100 101 102   oding: gzip, def
    19_628: 108 097 116 101 013 010 067 111 110 110 101 099 116 105 111 110   late..Connection
    19_644: 058 032 107 101 101 112 045 097 108 105 118 101 013 010 013 010   : keep-alive....
    0,CONNECT
    
    
    
    +IPD,0,280:GET / HTTP/1.1
    
    Host: 192.168.1.11
    
    User-Agent: Mozilla/5.0 (X11; Linux i686; rv:33.0) Gecko/20100101 Firefox/33.0
    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    
    Accept-Language: en-US,en;q=0.5
    
    Accept-Encoding: gzip, deflate
    
    Connection: keep-alive
    
    
    
    37 characters
    
    19_356 00_037:
    19_356: 049 044 067 079 078 078 069 067 084 013 010 065 084 043 067 073   1,CONNECT..AT+CI
    19_372: 080 083 069 078 068 061 048 044 053 048 013 013 010 013 010 079   PSEND=0,50.....O
    19_388: 075 013 010 062 032 049 013 010 072 111 115 116 058 032 049 057   K..> 1..Host: 19
    1,CONNECT
    
    AT+CIPSEND=0,50
    
    
    
    
    OK
    
    >
    
    <html><h1>Hello!! This is PropForth5.5</h1></html>  <--- Sent this to client PC
    
    28 characters
    
    19_356 00_028:
    19_356: 013 010 082 101 099 118 032 053 048 032 098 121 116 101 115 013   ..Recv 50 bytes.
    19_372: 010 013 010 083 069 078 068 032 079 075 013 010 010 013 010 079   ...SEND OK.....O
    
    
    Recv 50 bytes
    
    
    
    SEND OK
    
    10 characters
    
    19_356 00_010:
    19_356: 049 044 067 076 079 083 069 068 013 010 098 121 116 101 115 013   1,CLOSED..bytes.
    1,CLOSED
    
         --- After 3minutes  "Hello!! This is PropForth5.5" display on browser ---
    
    10 characters
    
    19_356 00_010:
    19_356: 048 044 067 076 079 083 069 068 013 010 098 121 116 101 115 013   0,CLOSED..bytes.
    0,CLOSED
    

    906 x 752 - 29K
  • my guess is that you need to send the header content-length, so the browser knows it has received all bytes and does not wait to time out?

    Enjoy!

    Mike

  • Hi.

    I sent data below;

    Content-Length:50 <html><h1>Hello!! This is PropForth5.5</h1></html>

    string[Content-Length:50 ] seems to deal as string.
    Browser took 3minuts.

    What is wrong?
    1152 x 823 - 33K
  • Hi.
    I add CIPCLOSE=0 following CIPSEND.

    Linux and smartphon(geanea) Immediately display Webpage.
    But Window8.1 and smartphon(sony) display after 3minuts.
  • Heater.Heater. Posts: 21,230
    edited 2017-02-21 11:37
    Aren't you supposed to have a blank line after the headers (CR and/or LF I forget which)? And two blank lines after the end of the HTML.

    Also close the connection after sending the data.

    See "server response" here : https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

    "content-length" is not required if all else is correct.

  • caskazcaskaz Posts: 957
    edited 2017-02-22 13:13
    HI.


    I have question.
    I sent <html><h1>Hello!! This is PropForth5.5</h1></html> to client.
    Linux and smartphone(geanea) immidoately display webpage from ESP-WROOM-02(192.168.1.11)
    But smartphone(VAIO) and Windows8.1 display webpage after 3minutes.

    Why smartphone(VAIO) and Windows8.1 take much time to display webpage?
    HTTP-request from Linux
    +IPD,0,280:GET / HTTP/1.1
    
    Host: 192.168.1.11
    
    User-Agent: Mozilla/5.0 (X11; Linux i686; rv:33.0) Gecko/20100101 Firefox/33.0
    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    
    Accept-Language: en-US,en;q=0.5
    
    Accept-Encoding: gzip, deflate
    
    Connection: keep-alive
    
    -----------------------------------------------------------------------------------------
    HTTP-request from smartphone(geanee)
    +IPD,0,507:GET / HTTP/1.1
    
    Host: 192.168.1.11
    
    Connection: keep-alive
    
    Cache-Control: max-age=0
    
    x-wap-profile: http://*.*.*.*/Xianghe/MTK_Phone_KK_UAprofile.xml
    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    
    User-Agent: Mozilla/5.0 (Linux; Android 4.4.2; FXC-5A Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
    
    Accept-Encoding: gzip,deflate
    
    Accept-Language: ja-JP,en-US;q=0.8
    
    X-Requested-With: com.android.browser
    
    -----------------------------------------------------------------------------------------
    HTTP-request from smartphone(VAIO)
    +IPD,0,333:GET / HTTP/1.1
    
    Host: 192.168.1.11
    
    User-Agent: Mozilla/5.0 (Android 5.0.2; Mobile; rv:51.0) Gecko/51.0 Firefox/51.0
    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    
    Accept-Language: ja,ja-JP;q=0.8,en-US;q=0.5,en;q=0.3
    
    Accept-Encoding: gzip, deflate
    
    Connection: keep-alive
    
    Upgrade-Insecure-Requests: 1
    
    ------------------------------------------------------------------------------------------
    HTTP-request from Windows8.1
    +IPD,0,295:GET / HTTP/1.1
    
    Host: 192.168.1.11
    
    User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    
    Accept-Language: ja,en-US;q=0.7,en;q=0.3
    
    Accept-Encoding: gzip, deflate
    
    Connection: keep-alive
    
  • Hi.

    I modified receiving "SEND OK" from ESP-WROOM-02.
    Trouble has gone.

    Linux/Windows8.1/smartphone(geanee)/smartphone(VAIO) immidiately display webpage.
  • HI.
    I wrote code for TTP229BSF.
    This touch-pad is easy.

  • astralasastralas Posts: 4
    edited 2017-08-02 07:22
    caskaz wrote: »
    I wrote code for HT16K33-24.

    ]

    Hello,

    since a few days I work with propforth and found the i2c_utility_0.2.1.f. Great collection.
    On my breadboard a ADAFruit LED Driver HT16K33 is connectet. With i2c_detect I can see the eeprom and
    the DS3132 connectet too but not the HT16K33. Another Forth system find it on $E0 and my .spin driver is working
    very well with the HT16K33.
    Any idea whats with the i2c tool? I try to check the source but cant find anything. And is it possible to get the ht16k33 driver?
    Thank you very much

    astralas
  • caskazcaskaz Posts: 957
    edited 2017-08-02 12:28
    Hi astralas.

    I can detect HT16K33.
    I use QuickStart board.
    Prop0 Cog6 ok
    i2c_detect
         0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <--eeprom
    60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- <-- DS3231
    70: 70 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <--HT16K33
    i2c_device:3
    
    
    Prop0 Cog6 ok
    
    Please check below;
    https://github.com/caskaz/PropForth5.5/tree/master/HW_Extensions/i2c_device
  • astralasastralas Posts: 4
    edited 2017-08-03 10:24
    This collection is fantastic. Dont find this on my search. I hope can try it bevor my holydays next week.
    Thank you very much cas :))
  • I made pulsemonitor.
    Time axis is 1.28sec(10msec/1dot)
    Update for pulse-value is 2seconds by 2seconds.

    LCD:160x128dots (ST7735R)
    Sensor:NJL5501R
    ADC:MCP3204

  • Printed out pulse.

  • Changed printing density.
  • astralasastralas Posts: 4
    edited 2017-11-24 10:08
    Hello and thanks.
    My HT16K33 works now. It was in confuse Vcc and Vi2c when I conect it to the I2C connections for the EEPROM.
    On other PIN's for I2C you can run the HT16K33 with connected Vi2c(without Vcc) :|
    Now, I have to change the code for 14-segment display.

    astralas
  • Hi.
    Operation voltage of HT16K33 is 4.5V-5.5V.
    Propeller operrate on 3.3V.
    So,bidirectinal-level-shifter need connection between propeller and HT16K33 on SCL and SDA.
    700 x 788 - 337K
  • .. or you can drive the HT16K33 by 3.3V ;)
    with a little bit loss of brighness
  • Hi, I changed time-axis for PulseMonitor to 160dots direction.

    Today, my dog's birthday.
    She is 14years old.
    4320 x 3240 - 2M
    720 x 960 - 91K
  • Happy Birthday to your dog!!! And continue your work with Propforth!
  • I bought very old 7SEG-LED-display(HDSP2121).
    Manufacturing date is 1997/47weeks.

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-01-18 08:02
    I have some old graphic 512x256 EL panels that I used many years ago in some of the first digital display panels for lift displays and they were mounted portrait style one above the other. Seeing you are digging up some old displays I figure I could dig those out and give it a bash too.

    However I must say that I grabbed your code and converted it across into Tachyon Forth to give me an insight into strengths and weaknesses but I am still assured that I made the right choice to implement Tachyon the way I did :)

    But there are still ways to improve the readability and efficiency of any code though. For instance you write a loop just to clear a buffer:
    : clrbufASCII buffer d36 0 do h20 buffer i + C! loop drop ;
    
    When a standard FILL command does the same thing faster and simpler:
    : clrbufASCII	buffer 36 $20 FILL ;
    

    Then I tried to make head or tail of convCode which I see from the datasheet for that particular part favors Katakana for the $20..$5F range. Your code:
    \ ( n1 -- n2 )  n1:char-code(Only ASCII code)  n2:converted code
    : convCode 
    h20 over h40 < 
    if 
         - 
    else 
         over h3F > if + else drop then
    then 
    ;
    
    Could have been much more readable if you simply offset first then compare and adjust.
    : convCode	$20 - DUP $1F > IF $40 + THEN ;
    
    In fact, even this could be simplified with a sneaky trick:
    : convCode	$20 - DUP $1F > $40 AND + ;
    

    Anyway, I reduced the source code to a fraction of the original and made the HDSP display an output device and simply print to it normally like this snippet:
    : demo
    	init prtALL
    	test 500 ms
    	HDSP PRINT" TEST" 500 ms
    	PRINT" MAY THE FORTH BE WITH YOU."
    	defineUDC
    

    I realize that you may be quite happy using PropForth but if you ever really wanted to compare strengths and weaknesses of different Forths then this is the perfect way to do so and have fun at the same time.

  • I made DogLifeClock.
    I use built-in-Kanji LCD(LM4049).
    It display name/current time/Birthday/Age (In human age)/LivingDays.
    If Dog die, this diasplay only name/BirthDay/DeathDay/LivingDays by removing short pin(P13).
  • TorTor Posts: 2,010
    That is beautiful - and also sad, we unexpectedly lost our own Shiba three weeks ago, just after her 15th birthday. I wish your Shiba many more years, and they can usually live longer than any other type of dog.
  • Made PulseMonitor.
    Displayed second derivative wave of photoplethysmogram too.

    LCD:ST7735
    rtc:DS3231
    ThermalPrinter:CSN-A2-T
    IRsensor:RPR220



    https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3465827/
  • Atached zip-file.
  • Ah, caskaz, I see by the heartbeat that you are still alive. :)
    Nice project and nicely documented too.

    I see you did some work with floating point. It's a pity someone can't do something to interface the F32 "ROM" in Tachyon as I've only done a very rudimentary interface since I never use it myself.
  • I bought 32x64LED-matrix(size:192×96mm, LED pitch:3mm).

  • Displaying string on 32x64LED-matrix.

Sign In or Register to comment.