Skip to content

Commit

Permalink
Merge pull request #73 from lucidcode/inspec-startup
Browse files Browse the repository at this point in the history
Monitor sensor on startup
  • Loading branch information
IAmCoder authored Sep 22, 2024
2 parents a4c54c3 + b5a6c33 commit 74afd91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
16 changes: 4 additions & 12 deletions firmware/src/omv/boards/INSPEC/main_py.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
static const char fresh_main_py[] =
"# main.py -- put your code here!\n"
"import machine, time\n"
"led = machine.LED(\"LED_BLUE\")\n"
"while (True):\n"
" led.on()\n"
" time.sleep_ms(150)\n"
" led.off()\n"
" time.sleep_ms(100)\n"
" led.on()\n"
" time.sleep_ms(150)\n"
" led.off()\n"
" time.sleep_ms(600)\n"
"from inspec import inspec_sensor\n"
"\n"
"inspec = inspec_sensor()\n"
"inspec.monitor()\n"
;
5 changes: 0 additions & 5 deletions firmware/src/omv/common/mp_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ int mp_init_filesystem(fs_user_mount_t *vfs) {
f_write(&fp, fresh_main_py, sizeof(fresh_main_py) - 1 /* don't count null terminator */, &n);
f_close(&fp);

// Create readme file
f_open(&vfs->fatfs, &fp, "/README.txt", FA_WRITE | FA_CREATE_ALWAYS);
f_write(&fp, fresh_readme_txt, sizeof(fresh_readme_txt) - 1 /* don't count null terminator */, &n);
f_close(&fp);

return 0;
}
#endif
Expand Down

0 comments on commit 74afd91

Please sign in to comment.