Download Print this page

MiniBot Nanopix Step By Step Manual Manual

Programming in python
Hide thumbs Also See for Nanopix:

Advertisement

Quick Links

NANOPIX DRONE
programming in
Python
Step by step manual
for Windows users
1

Advertisement

loading
Need help?

Need help?

Do you have a question about the Nanopix and is the answer not in the manual?

Questions and answers

Summary of Contents for MiniBot Nanopix

  • Page 1 NANOPIX DRONE programming in Python Step by step manual for Windows users...
  • Page 2: Download And Install

    1. Download and install 1.1 Download archive PythonForNanopix.zip via link: 1.3 Unpack archive https://www.minibot.tech/programming_tools/PythonForNanopix.zip PythonForNanopix.zip 1.2 Download archive NanopixGroundStation.zip via link: https://minibot.tech/programming_tools/NanopixGroundStation.zip 1.4 Unpack archive NanopixGroundStation.zip and run the installer NanopixGroundStation-x.x.exe You can also find them on resources page: 1.5 Download and install the tool Thonny (or choose any other, if you prefer) https://thonny.org/...
  • Page 3 2. NanopixGroundStation setup 2.2 Plug the battery to Nanopix board and 2.1 Run installed program connect your PC to Nanopix Wi-Fi network. It NanopixGroundStation: will be called like this: Nanopix<number> (default password: 12345678) While PC is not connected with Nanopix - you will see...
  • Page 4 2. NanopixGroundStation setup 2.3 After Wi-Fi initialization you will see 2.4 Here you can control your NANOPIX, modify successfully connection icon in parameters, calibrate, flash firmwares, etc. NanopixGroundStation UI elements for controlling the drone: ● Forward / backward / left / right movements and arm/disarm motors button ●...
  • Page 5 3. Thonny IDE set up 3.1 Run the installed software Thonny and open the file: <the path, where the archive is extracted>\PythonForNanopix\examples\blink.py 3.2 Change interpreter from default to the next: <the path, where the archive is extracted>\PythonForNanopix\python37\python.e 1. For this choose the tab “Run” -> “Select interpreter...”...
  • Page 6: Running The Program

    4. Running the program 4.3 To run the script press green Play button: 4.1 Make sure your PC is connected to the Wi-Fi of the drone Nanopix <number> (default password 12345678) 4.2 Example from the file blink.py will make the front LED of the drone blink: To stop the script while it’s running press the...
  • Page 7: Troubleshooting

    Troubleshooting 1. Open Wi-Fi settings and setup static IP address: The smartphone is losing Wifi connection with NANOPIX drone all the time (Android 8+ frequent problem) Before Wi-Fi connection disable next things: mobile data hotspot Wi-Fi point This should fix it: ●...
  • Page 8 API description Controlling the integrated RGB LEDs: ● get_roll() -> float - returns the set_front_led(R: int, G: int, B: int) current roll angle in degrees set_back_led(R: int, G: int, B: int) [-180, 180] Sets the color value for the front/rear LED. R, G, B - color channels with the range of values [0..255] ●...
  • Page 9 API description Automatic takeoff and landing: takeoff() - takes off the drone to a height of centimeters land() - automatic landing (from any height) and engines turn off ...\PythonForNanopix\examples\takeoff_land.py Usage example: Yaw angle control functions: rotate_yaw(yaw_offset_deg: int) - rotate drone by yaw (in range [-180, 180]) relative with angle speed ●...
  • Page 10 API description Altitude control: ● offset_altitude(delta_meters: float) - - change target altitude relative (in range [-3.0, 3.0]) based on current altitude with target speed (in range [0.1, 0.75]). Default speed: 0.2 m/s. ● set_altitude(z_pos: float) set absolute altitude value in meters (in range [0.15, 3.0]) with target speed (in range [0.1, 0.75]).
  • Page 11 API description Coordinates based movement: ● offset_xy_pos(dx_meters: float, dy_meters: float) - relative movement (in range [-5.0, 5.0]) based on current position with target speed (in range [0.1, 1.0]). Default speed: 0.4 m/s. ● set_xy_pos(x_meters: float, y_meters: float) - set absolute position in meters with target speed (in range [0.1, 1.0]).
  • Page 12 API description Manual control functions (like sticks controlling): ● set_pitch(pitch_deg: int, pitch_only: bool = true) - set pitch angle in degrees in the range [-35, 35]. pitch_only option enables special mode: all other movements (roll, yaw or altitude) will be stopped.