1
0
Fork 0
mirror of https://github.com/sensebox/blockly-app synced 2025-02-20 11:53:58 +01:00
Android & iOS app for senseBox blockly
Find a file
2020-03-24 10:22:47 +01:00
resources update icon & splash, also for iOS 2019-04-09 20:10:07 +02:00
src update blockly 2019-05-16 18:20:26 +02:00
tools improve logserver 2020-03-24 10:22:47 +01:00
typings initial project 2018-10-22 09:50:51 +02:00
.editorconfig Initial commit 2018-10-20 09:06:02 +02:00
.gitignore switch build commands to --prod 2019-02-17 13:34:48 +01:00
.gitmodules blockly-wrap first try w/out save/delete button 2018-11-19 08:43:29 +01:00
.travis.yml travis: build on node 12 2020-03-07 12:30:22 +01:00
config.xml v1.1.4 2019-05-16 18:20:57 +02:00
ionic.config.json rename app to "Blockly for senseBox" 2019-02-17 14:03:31 +01:00
LICENSE add LICENSE 2019-02-16 22:10:27 +01:00
package-lock.json update dependencies for node 12 compat 2020-03-07 13:00:08 +01:00
package.json update dependencies for node 12 compat 2020-03-07 13:00:08 +01:00
README.md update apk signing documentation 2019-05-16 18:48:37 +02:00
tsconfig.json Initial commit 2018-10-20 09:06:02 +02:00
tslint.json Initial commit 2018-10-20 09:06:02 +02:00

Blockly for senseBox app Build Status Fdroid Badge github releases

Blockly for senseBox is a visual programming editor for the senseBox:edu on mobile. It is based on Google's Blockly and Carlos Pereira Atencio's Ardublockly.

Features

  • generate Arduino code with visual drag-and-drop blocks, with blocks for the senseBox platform.
  • online compiler for senseBox MCU
  • over the air programming via WiFi
  • Android 7+ & Web-browser support. (iOS support is upcoming)

Development

This is an Ionic 3 / Angular 5 application using Cordova Plugins for mobile-native functionality.

dev env setup

For a basic web version, only Node.js 8+ is required. For Android & iOS builds the respective platform tooling is required.

This repo contains mandatory submodules; so you need to clone this repo via

git clone --recursive https://github.com/sensebox/blockly-app.git

To install npm dependencies run npm install once.

Then run npm start to start a hot-reloading development view in the browser on http://localhost:8100.

Ionic & cordova provide CLIs for plugin installation & code generation. You might want to install them with npm install -g ionic cordova.

android specific

First install the Android toolchain on your system.

Make sure you have the correct environment variables set. On linux you could add this to your ~/.bashrc:

export ANDROID_SDK=$HOME/Android/Sdk
export ANDROID_HOME=$ANDROID_SDK
export PATH=$PATH:$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$ANDROID_SDK/tools/bin:$ANDROID_SDK/platform-tools:$ANDROID_SDK/build-tools/28.0.3

To build & deploy on an emulator or device use the android:* build commands defined in package.json (some only work on linux), for example:

npm run android:dev # build debug build & deploy to connected device & restart app
release signing

You need a keystore with a valid signing key!

zipalign -p 4 blockly-unsigned.apk blockly-aligned.apk 
apksigner sign -ks reedu-android.keystore --in blockly-aligned.apk --out blockly-signed.apk

updating blockly

Blockly is included as a submodule, linking to https://github.com/sensebox/ardublockly-1. To update it, just pull in the commit you want, and commit the change in this repository:

cd src/assets/blockly
git pull
cd ../../..
git commit -m 'update blockly'

License

The source code in this repository is GPL-2 licensed. Submodules such as Blockly may be licensed differently, please check their respective repositories.