iwalker
Posts: 1
Joined: Fri Sep 04, 2015 5:48 pm

Re: WiFiMCU LUA ported to MICO 2.3.0.2

Tue Dec 22, 2015 11:21 am

Great Work

Any chance that Mark/Space parity can be supported ?

TIA
Ian

profra
Posts: 2
Joined: Tue Nov 17, 2015 3:14 pm

Re: WiFiMCU LUA ported to MICO 2.3.0.2

Tue Dec 22, 2015 4:12 pm

@loboris I went through your Reference and found out that you implemented OLED with SPI only... I have some pieces of OLED with I2C only... Would it be possible for you to implement I2C too? .... for us we have only I2C version... Or any advise how to solve it and use your OLED library?
Thanks for you answer.

loboris
Posts: 40
Joined: Tue Sep 15, 2015 7:47 am
Location: Zagreb, Croatia

Re: WiFiMCU LUA ported to MICO 2.3.0.2

Wed Dec 23, 2015 7:18 pm

iwalker wrote:Great Work

Any chance that Mark/Space parity can be supported ?

TIA
Ian

Mark/Space parity can be easily supported in software emulated UART, I'll include it in the next version.

I don't think it is possible with hardware UART, but you can emulate sending 8-bits with mark/space parity configuring UART for 9-bit, no partity and manually setting the 9th bit to space/mark.

loboris
Posts: 40
Joined: Tue Sep 15, 2015 7:47 am
Location: Zagreb, Croatia

Re: WiFiMCU LUA ported to MICO 2.3.0.2

Wed Dec 23, 2015 7:24 pm

profra wrote:@loboris I went through your Reference and found out that you implemented OLED with SPI only... I have some pieces of OLED with I2C only... Would it be possible for you to implement I2C too? .... for us we have only I2C version... Or any advise how to solve it and use your OLED library?
Thanks for you answer.

I'm working on some improvements in I2C module, when I finish it I'll include I2C in OLED module (soon).

loboris
Posts: 40
Joined: Tue Sep 15, 2015 7:47 am
Location: Zagreb, Croatia

Re: WiFiMCU LUA ported to MICO 2.3.0.2

Sat Jan 02, 2016 1:56 pm

UPDATED to Ver. 0.9.12_LoBo

  • Partial upgrade to MICO v2.4
  • Added MQTT client module
    • background operation (MICO thread)
    • up to 3 mqtt clients
    • each mqtt client can subscribe to up to 5 topics
    • automatic reconnect if disconnected
    • automatic resubscribe to subscribed topics on reconnect
    • optional debug output
    • each client has separate callback functions for mqtt events
    • client can publish to subscribed or unsubscribed topics
    • mqtt-demo.lua included (Document/WiFiMCU/demos/12 mqtt)
See WiFiMCU LUA Reference.pdf for details.

Download WiFiMCU.LUA_0.9.12_LoBo.bin
Download Bootloader.bin ver. 2.3

loboris
Posts: 40
Joined: Tue Sep 15, 2015 7:47 am
Location: Zagreb, Croatia

Re: WiFiMCU LUA ported to MICO 2.3.0.2

Tue Jan 12, 2016 12:33 pm

UPDATED to Ver. 0.9.13_LoBo

  • Upgraded MICO to ver 2.4
  • Completely rewritten i2c module, added hardware I2C
  • Added I2C interface for OLED displays in oled module
  • Added option to use own initialization sequence in oled.init()
See WiFiMCU LUA Reference.pdf for details.

Download WiFiMCU.LUA_0.9.13_LoBo.bin
Download Bootloader.bin ver. 2.3

Asturias
Posts: 11
Joined: Tue Jan 12, 2016 7:52 pm
Location: France

Init file not defined ?

Thu Jan 14, 2016 7:25 pm

Hi,

I am testing DOIT module.
I have flashed Loboris last firmware version + last bootloader version.
I have 2 files uploaded : init.lua and main.lua that make the blue led flashing and display ticks.
Work ok

Code: Select all

--- init.lua ---
gpio.mode(0, gpio.INPUT_PULL_DOWN)
if gpio.read(0) == 1 then
dofile("main.lua")
end


Code: Select all

-- Main.lua
print("Flash LED")
pin = 17
gpio.mode(pin,gpio.OUTPUT)
tmr.start(0,1000,function()
 gpio.toggle(pin)
 print("OK")
 print (tmr.tick())
end)


My problem is after a reset , restart, I get information about mcu and :
Init file not defined and I have to enter dofile("init.lua") to restart program
Am I missing something ?

Thank you

loboris
Posts: 40
Joined: Tue Sep 15, 2015 7:47 am
Location: Zagreb, Croatia

Re: Init file not defined ?

Thu Jan 14, 2016 11:28 pm

Asturias wrote:Hi,
...
My problem is after a reset , restart, I get information about mcu and :
Init file not defined and I have to enter dofile("init.lua") to restart program
Am I missing something ?

The file which is executed on reset is defined in system parameters. It can be "init.lua" or any other file. The default is "" - no file is executed.
To set the name of the file executed on restart run the command:

Code: Select all

mcu.setparams({init_file="init.lua"})

Look at mcu module section in WiFiMCU LUA Reference.pdf for more detailes

BTW, I suggest to use different GPIO in "init.lua". D0 has 10K pullup resistor and is connected to bootloader switch, so your "main.lua" will always be executed.

Asturias
Posts: 11
Joined: Tue Jan 12, 2016 7:52 pm
Location: France

Re: WiFiMCU LUA port with many new modules and enhancements

Fri Jan 15, 2016 9:55 am

Hi,
Thank you very much Loboris !
Salutations

loboris
Posts: 40
Joined: Tue Sep 15, 2015 7:47 am
Location: Zagreb, Croatia

Re: WiFiMCU LUA port with many new modules and enhancements

Wed Jan 27, 2016 10:48 am

UPDATED to Ver. 0.9.14_LoBo

  • Some fixes and enhancements
  • Added random function in mcu module
  • LCD module upgraded
    • Added support for ILI9341 TFT modules
    • Many new functions and enhancements (see the manual)
    • Improved speed
    • Added lcddemo.lua which demonstrates all the basic lcd functions (Video)
See WiFiMCU LUA Reference.pdf for details.

Download WiFiMCU.LUA_0.9.14_LoBo.bin
Download Bootloader.bin ver. 2.3
Download Lua demo archive


Return to “WiFiMCU”

Who is online

Users browsing this forum: No registered users and 2 guests