Skip to content

Commit 0ad03e8

Browse files
authored
Merge pull request #13 from arduino/cleanup/examples
Cleanup/examples
2 parents 4f41262 + dacf92c commit 0ad03e8

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

arduino/arduino.py

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def get_template_path():
8282
return '/'.join(__file__.split('/')[:-1]) + '/template.tpl'
8383

8484
def create_sketch(sketch_name = None, destination_path = '.', overwrite = False, source_path = None):
85-
8685
if sketch_name is None:
8786
sketch_name = 'main'
8887
new_sketch_path = f'{destination_path}/{sketch_name}.py'
File renamed without changes.
File renamed without changes.

install.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
#!/bin/bash
22
#
3-
# Install Arduino Runtime to a MicroPython board using mpremote.
3+
# MicroPython Package Installer
4+
# Created by: Ubi de Feo and Sebastian Romero
5+
#
6+
# Installs a MicroPython Package to a board using mpremote.
7+
#
48
# This script accepts an optional argument to compile .py files to .mpy.
59
# Simply run the script with the optional argument:
610
#
711
# ./install.sh mpy
812

13+
# Name to display during installation
914
PKGNAME="Arduino Runtime for MicroPython"
15+
# Destination directory for the package on the board
1016
PKGDIR="arduino"
17+
# Source directory for the package on the host
1118
SRCDIR=$PKGDIR
19+
# Board library directory
1220
LIBDIR="lib"
1321

1422
# File system operations such as "mpremote mkdir" or "mpremote rm"
@@ -86,6 +94,8 @@ for filename in $SRCDIR/*; do
8694
source_extension="${f_name##*.}"
8795
destination_extension=$source_extension
8896

97+
# If examples are distributed within the package
98+
# ensures they are copied but not compiled to .mpy
8999
if [[ -d $filename && "$f_name" == "examples" ]]; then
90100
if ! directory_exists "/${LIBDIR}/${PKGDIR}/examples"; then
91101
echo "Creating $LIBDIR/$PKGDIR/examples on board"

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"urls": [
33
["arduino/__init__.py", "github:arduino/arduino-runtime-mpy/arduino/__init__.py"],
44
["arduino/arduino.py", "github:arduino/arduino-runtime-mpy/arduino/arduino.py"],
5-
["arduino/template.tpl", "github:arduino/arduino-runtime-mpy/arduino/template.tpl"]
5+
["arduino/template.tpl", "github:arduino/arduino-runtime-mpy/arduino/template.tpl"],
6+
["arduino/examples/00_basic.py", "github:arduino/arduino-runtime-mpy/arduino/examples/00_basic.py"],
7+
["arduino/examples/01_arduino_blink.py", "github:arduino/arduino-runtime-mpy/arduino/examples/01_arduino_blink.py"],
8+
["arduino/examples/02_nano_esp32_advanced.py", "github:arduino/arduino-runtime-mpy/arduino/examples/02_nano_esp32_advanced.py"]
69
],
710
"deps": [],
811
"version": "0.1.0"

0 commit comments

Comments
 (0)