What script runs when you power on the board?

Discussion related to "under the hood" OpenMV topics.
zeno
Posts: 1
Joined: Sat Jul 16, 2016 6:57 am

What script runs when you power on the board?

Postby zeno » Sat Jul 16, 2016 7:03 am

I've just received my board, which works fine with Windows XP (though so far I can't get it working with OSX).

I have a very simple (probably stupid) question. When the board is powered on (e.g. by plugging it into a USB socket on a computer), what script automagically runs? Is it main.py? That seems likely since that produces the blue heartbeat led flashing. If so, I presume rewriting main.py would allow other things to happen on a power-on.
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: What script runs when you power on the board?

Postby kwagyeman » Sat Jul 16, 2016 8:59 am

Yep! Main.py is the script that runs on power on.

Oh, so we have a Mac Ide now. Please email me at the OpenMV email and I'll send you a link.
Nyamekye,
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: What script runs when you power on the board?

Postby kwagyeman » Sat Jul 16, 2016 3:13 pm

The new OpenMV IDE preview is now available for Windows/Mac/Linux now.



Windows: http://openmv.io/upload/openmv-ide-wind ... -1.0.0.exe



Mac: http://openmv.io/upload/openmv-ide-mac- ... -1.0.0.dmg



Linux-32-bit: http://openmv.io/upload/openmv-ide-linu ... -1.0.0.run (built using Ubuntu 12.04)



Linux-64-bit: http://openmv.io/upload/openmv-ide-linu ... -1.0.0.run (built using Ubuntu 12.04)
Nyamekye,
User avatar
dhylands
Posts: 33
Joined: Sun May 31, 2015 1:27 pm
Location: Shuswap, BC, Canada
Contact:

Re: What script runs when you power on the board?

Postby dhylands » Sat Jul 16, 2016 11:40 pm

Not sure if this is a problem or not, but I get the following errors printed everytime I launch the IDE (linux 64-bit running under ubuntu 16.04):

Code: Select all

QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
Warning: Failed to open settings database at "/home/dhylands/.config/OpenMV/OpenMVIDE.db" ("Driver not loaded")
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: What script runs when you power on the board?

Postby kwagyeman » Sun Jul 17, 2016 9:27 am

Guess your Linux system doesn't have the SQL light driver. I'm not using that part of QtCreator right now. I will comment out that code. All settings are stored in an ini file right now. The SQL code is for a secondary database that stores more settings.

Those links will be posted in a KickStarter updates soon. Once Michael checks his email...
Nyamekye,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: What script runs when you power on the board?

Postby iabdalkader » Fri Jul 22, 2016 8:40 am

zeno wrote:I've just received my board, which works fine with Windows XP (though so far I can't get it working with OSX).
If so, I presume rewriting main.py would allow other things to happen on a power-on.
Yes, if you save any script as main.py it will run on power-up.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests