We Connect Things To The Internet... That Can't Be Plugged In.
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
This topic
This board
Entire forum
News:
mcCloud is coming soon!!!!
Home
Search
Login
Register
mc-Products
»
mc-Studio
»
MC-120 module crashes after simply adding an extra file to the project.
« previous
next »
Print
Pages: [
1
]
Author
Topic: MC-120 module crashes after simply adding an extra file to the project. (Read 294 times)
rudydevolder
Newbie
Posts: 26
Belgian guy married Phillipina
Location: Philippines
MC-120 module crashes after simply adding an extra file to the project.
«
on:
October 27, 2017, 01:52:13 am »
After just adding a file to my project, and only calling the constructor my MC-120 module hangs, I can't connect any more and I must first connect via MC-OTA-updater to erase the script.
So the only instructions executed in my Class are:
Class WaterTank
Shared Address As Byte
Shared Sensor As I2c
Public Sub New(_address As Byte)
Address = _address
Sensor = I2c.Create(400000, Pin.SCL, Pin.SDA, Address)
End Sub
.......
End Class
And in my main program:
Shared UartTerm As UART_Debug
Shared WaterTank1 As WaterTank
Shared Event Boot()
Lplan.SetMidPowerMode(1)
Lplan.SetBeaconTime(2)
UartTerm = New UART_Debug()
WaterTank1 = New WaterTank(0x10)
End Event
I'm thinking maybe a memory leak in I2C
Logged
mc-John
Global Moderator
Full Member
Posts: 212
Re: MC-120 module crashes after simply adding an extra file to the project.
«
Reply #1
on:
October 30, 2017, 10:58:41 am »
The problem is the SetMidPowerMode(1). 1 milisecond is to fast and something must overflow. The minimum value is 20 milliseconds but that takes a big load. Make it 250 or just remove the statement. Beaconing every 2 seconds is fast but should work.
Logged
Print
Pages: [
1
]
« previous
next »
mc-Products
»
mc-Studio
»
MC-120 module crashes after simply adding an extra file to the project.