Page 1 of 1

How to Add self made driver in micropython ?

Posted: Tue Jul 17, 2018 11:39 am
by nikhiledutech
Hello,

So i have created a driver file for a particular sensor. Now i want to add this module in micropython in such a way that i can easily import it.


At present i am copying the driver file into PYBFlash drive. Than importing it. But what if i want to import the driver, without copying the module into PYBFlash drive ? Is there any steps available for adding self made driver into Micropython main directory ?


For more clear example there is pyb module in micropython, which have many submodules supportiing I2C, SPI etc. Similarly i want to add my module and import it.


Does anyone have any idea of how to do it ? Does I need to make change in cloned micropython repo ?

Re: How to Add self made driver in micropython ?

Posted: Wed Jul 18, 2018 8:05 am
by pythoncoder