How to Add self made driver in micropython ?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
nikhiledutech
Posts: 118
Joined: Wed Dec 27, 2017 8:52 am

How to Add self made driver in micropython ?

Post by nikhiledutech » Tue Jul 17, 2018 11:39 am

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 ?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: How to Add self made driver in micropython ?

Post by pythoncoder » Wed Jul 18, 2018 8:05 am

Peter Hinch
Index to my micropython libraries.

Post Reply