deleted Test Folder
Showing
############################################################ | |||
# Dockerfile to build esp32 container | |||
## Author: Alois Mbutura | |||
## Modified by : Allan Juma | |||
#run with docker run -t -i --device=/dev/ttyUSB0 ubuntu bash | |||
#The script here is derived from: http://esp-idf.readthedocs.io/en/latest/linux-setup.html | |||
############################################################ | |||
# Set the base image to Ubuntu | |||
FROM ubuntu:16.04 | |||
# File Author / Maintainer | |||
MAINTAINER [email protected] | |||
# Update the repository sources list | |||
RUN apt-get update | |||
################## BEGIN INSTALLATION ###################### | |||
RUN BASE=$(pwd) | |||
RUN apt-get update && apt-get install -y git make libncurses-dev flex bison gperf python python-serial wget --fix-missing | |||
# Get or update IDF | |||
RUN echo "[$0]: Get or update IDF" | |||
RUN if [ -d esp-idf ]; then echo "[$0]: Found esp-idf, updating." && cd esp-idf && git pull && git submodule update --recursive && cd $BASE; else git clone --recursive https://github.com/espressif/esp-idf.git; fi | |||
## Perform mandatory removal of any tar files in case of a previous error | |||
RUN if [ -f *.tar.gz ] || [ -f *.tar.gz.* ]; then echo "[$0]: Removing residual tar file(s)" && rm *.tar.gz 2>/dev/null && rm *.tar.gz.* 2>/dev/null; fi | |||
## Get 64 bit linux binary toolchain -- this might get out of date when they change blobs: | |||
## Current version 1.22.0-61-gab8375a-5.2.0 | |||
RUN if [ -d xtensa-esp32-elf ]; then echo "[$0]: Found ESP32 binary toolchain. Performing mandatory replacement." && echo "[$0]: Current version at the making of this makefile 1.22.0-61-gab8375a-5.2.0" && echo "[$0]: Check current version from http://esp-idf.readthedocs.io/en/latest/linux-setup.html" && rm -rf xtensa-esp32-elf && wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz && tar -xvzf xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz; else wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz && tar -xvzf xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz && rm *.tar.gz; fi | |||
## Get demo application | |||
RUN echo "[$0]: Get demo application" && if [ -d esp-idf-template ]; then echo "[$0]: Found esp-idf-template, updating." && cd esp-idf-template && git pull && cd $BASE; else git clone https://github.com/espressif/esp-idf-template.git; fi | |||
## Setup environment variables: | |||
## Works for _this_ directory structure. You will need to change these if you deviate | |||
## Also, you might copy these lines into a separate script to reset these variables as necessary. | |||
RUN echo "[$0]: Setup environment variables" | |||
ENV IDF_PATH ${BASE}/esp-idf | |||
RUN echo "[$0]: export IDF_PATH=${BASE}/esp-idf" | |||
ENV PATH "$PATH:${BASE}/xtensa-esp32-elf/bin" | |||
RUN echo "[$0]: export PATH=$PATH:${BASE}/xtensa-esp32-elf/bin" | |||
RUN echo "" | |||
RUN echo "[$0]: IDF demo instructions" | |||
RUN echo "[$0]: [1] cd $BASE/esp-idf-template and" | |||
RUN echo "[$0]: [2] Type make menuconfig or make flash to get started" |
Test Folder/app_bt.c
deleted
100644 → 0
This diff is collapsed.
esp32-nodejs-samples @ a0048ac1
File deleted
This diff is collapsed.
#! /bin/sh | |||
#Bitsoko script for intel edison | |||
################################ | |||
clone(){ | |||
#Remove any folders and held contents recursively and non interactively. | |||
echo "Removing stale folders..." | |||
rm -rf ~/bitsoko ~/bitsoko_lite | |||
echo "Making new directory" | |||
mkdir ~/bitsoko_lite | |||
cd ~/bitsoko_lite | |||
echo "changing working directory, now cloning" | |||
git clone https://github.com/bitsoko-services/hardware | |||
echo "successfully setup bitsoko lite" | |||
} | |||
################################ | |||
install_deps(){ | |||
#Install sockets node lib ver 1.3.7 | |||
echo "Retreiving node prerequisites, kindly wait..." | |||
npm install [email protected] | |||
#Check for git and install if lacking | |||
echo "Checking for git prerequisite, kindly wait..." | |||
if [ -f /usr/bin/git ] | |||
then | |||
#Do nothing | |||
else: | |||
if [ opkg install git ] | |||
then | |||
#Do nothing | |||
else | |||
echo "src all http://iotdk.intel.com/repos/2.0/iotdk/all" >> /etc/opkg/base-feeds.conf | |||
echo "src x86 http://iotdk.intel.com/repos/2.0/iotdk/x86" >> /etc/opkg/base-feeds.conf | |||
echo "src i586 http://iotdk.intel.com/repos/2.0/iotdk/i586" >> /etc/opkg/base-feeds.conf | |||
opkg update | |||
opkg install git | |||
fi | |||
fi | |||
} | |||
################################ | |||
run_webpage(){ | |||
if [[ "$(ping -c 1 8.8.8.8 | grep '100% packet loss' )" != "" ]]; | |||
then | |||
echo "Network absent" | |||
exit 1 | |||
else | |||
echo "Network is present" | |||
echo "Available ip addresses on this computer" | |||
ifconfig | awk '/inet addr/{print substr($2,6)}' | |||
echo "Starting webserver demo" | |||
node ~/bitsoko_lite/hardware/intel_edison/webpage.js | |||
fi | |||
} | |||
################################ | |||
echo "Bitsoko lite script Initialized. what would you like to do? clone or quit or install_deps or run-webpage" | |||
read action | |||
if [ $action = clone ] | |||
then | |||
clone | |||
exit | |||
elif [ $action = install_deps ] | |||
then | |||
install_deps | |||
exit | |||
elif [ $action = quit ] | |||
then | |||
exit | |||
elif [ $action = run-webpage ] | |||
then | |||
run_webpage | |||
fi |
Please register or sign in to comment