This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################################################### | |
| # | |
| # Newtelco Windows PC Setup Script | |
| # Author: ndomino@newtelco.de | |
| # Date: 05.04.19 | |
| # | |
| ################################################### | |
| # Install Boxstarter (run in a PowerShell (Administrator) shell) | |
| Set-ExecutionPolicy RemoteSigned |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: Paste the next line in an admin prompt to install packages (at your own risk!) | |
| :: cmd /V:on /C "set url=https://gist.github.com/snoerenberg/f70f1e20bea64ba6370cdb5455392b3b/raw & set batchfile=!temp!\install-packages-!RANDOM!.cmd & bitsadmin /transfer getbat /download /priority normal !url! !batchfile! & call !batchfile! & del !batchfile!" | |
| @setlocal EnableDelayedExpansion | |
| set packages= | |
| for %%a in ( | |
| adobereader | |
| firefox | |
| 7zip.install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - attach Keywish BLE Nano to USB on PC | |
| - check which serial port is present | |
| - open serial monitor/console | |
| Configure: | |
| AT+SETTING=DEFAULT | |
| -> factory reset (just to make sure) | |
| AT+MINI_INTERVAL=20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. PiBakery Mac download: https://www.pibakery.org/docs/install-mac.html | |
| 2. Download PiBakery Recipe https://gist.githubusercontent.com/snoerenberg/11b266ef2c0dcb8fbf638be40bf1177f/raw/4a1cb56ccb98039e9354ada92f07b848483f79c2/SerialPiBakery.xml | |
| 3. Insert SD Card to Mac | |
| 4. Start PiBakery, import recipe xml, make changes to hostname etc. if necessary | |
| 5. write to SD card with PiBakery | |
| 4. Insert SD in Raspberry Pi, connect ethernet, power on, wait :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <xml xmlns="http://www.w3.org/1999/xhtml"><block type="onfirstboot" id="onfirstboot" x="105" y="43"><next><block type="packageinstall" id="Q;J;V@hCCJdI;uLhM=4W"><field name="1">python3-pip</field><next><block type="sethostname" id="MiG]@UpqBSk8qH%/IeWl"><field name="1">cardreader01</field><next><block type="changepass" id="5DE){[f=xya.}:P*H?xo"><field name="1">cardreader01pw</field><next><block type="runcommand" id="=pCYhrjZ#TL{hUWplv9-"><field name="1">pip3 install flask pyserial</field><field name="2">root</field><next><block type="downloadfile" id="SI`xk]Ml941+lHJgpr*)"><field name="1">https://gist.github.com/snoerenberg/8ed05ff7b9d63243c7cd573f3b8ca0c2/raw/ddaa5f4e3506ce46b9486701c4dbdf5bf29abe93/serialrestapp.py</field><field name="2">/home/pi/serialrestapp.py</field><next><block type="authorizekey" id="u1bf][ZorX~8|dHAx?9a"><field name="1">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDu/P7/qX56dgAhPcg3YrinvDYKlUiC0ZiCOTWAQbgRN6bF0/WyJk/y3IQT5yDIZAy+PALVcT9dVVhQGZypeM92dsahxgcd/SfqA7xDlmtdy8bqLyPQdieAdw+wd0C318 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| import serial | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| return 'Hello world' | |
| @app.route('/getCardNumber') |