# Help adding new modules

**URL:** <https://discuss.bluerobotics.com/t/help-adding-new-modules/2686>\
**Category:** Blue Robotics Software\
**Created:** [May 21, 2018, 12:35am UTC](https://discuss.bluerobotics.com/t/help-adding-new-modules/2686 "2018-05-21T00:35:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![milkKarten](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@milkKarten](https://discuss.bluerobotics.com/u/milkKarten)\
**Post date:** [May 21, 2018, 12:35am UTC](https://discuss.bluerobotics.com/t/help-adding-new-modules/2686/1 "2018-05-21T00:35:29Z")

</div>

I used the custom image from Ardusub to setup my raspberry pi (which connects to a PixHawk to control the motors). I am able to use mavproxy modules that currently exist to control the motors but I am unable to use new modules. I add them to /MAVProxy/modules and then run _setup.py build etc_ but when I try to load the modules with _module load newMod_, it doesn’t work. Please help

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [May 21, 2018, 1:10am UTC](https://discuss.bluerobotics.com/t/help-adding-new-modules/2686/2 "2018-05-21T01:10:46Z")

</div>

Can you share your code?

---

<div class="post-metadata">

**Author:** ![milkKarten](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@milkKarten](https://discuss.bluerobotics.com/u/milkKarten)\
**Post date:** [May 21, 2018, 1:28am UTC](https://discuss.bluerobotics.com/t/help-adding-new-modules/2686/3 "2018-05-21T01:28:09Z")

</div>

I would love to but I am not sure what I am sharing. I tested adding new modules by duplicating the mavproxy\_example.py module and changing everywhere where it said example to example2, thus creating the mavproxy\_example2.py module.  
This is stored in /usr/local/lib/python2.7/dist-packages/MAVProxy/modules

In a prior robot, I was able to then go to /usr/local/lib/python2.7/dist-packages and run the setup.py script:

_sudo python setup.py build install --user_

to make mavproxy\_example2.py usable by mavproxy. However, mavproxy tells me **no module: mavproxy\_example2.py found** which is odd because the statements from setup.py tell me that a byte compiled version of _example_ was created and stored in

_copying build/lib.linux-armv7l-2.7/MAVProxy/modules/mavproxy\_example2.py → build/bdist.linux-armv7l/egg/MAVProxy/modules_

However after running mavproxy, I used the command _module load example2_ and received the aforementioned error message.

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [May 22, 2018, 4:40am UTC](https://discuss.bluerobotics.com/t/help-adding-new-modules/2686/4 "2018-05-22T04:40:11Z")

</div>

Please provide the file example2.py and screenshots, or paste of the terminal commands for build install and running mavproxy to show what it looks like to you (directory and everything).

---

<div class="post-metadata">

**Author:** ![milkKarten](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@milkKarten](https://discuss.bluerobotics.com/u/milkKarten)\
**Post date:** [May 22, 2018, 4:51am UTC](https://discuss.bluerobotics.com/t/help-adding-new-modules/2686/5 "2018-05-22T04:51:09Z")

</div>

Thanks anyways. Solved the issue. called mavproxy.py in a different directory and it solved my issues
