Giter VIP home page Giter VIP logo

kathyreid / sensebreast Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 3.08 MB

A sensing mastectomy prosthetic based on RPi 3B+ and a Sense HAT

Home Page: https://sensebreast.org

License: GNU General Public License v3.0

MATLAB 42.25% Shell 3.73% CSS 2.79% HTML 1.58% JavaScript 18.20% Python 31.44%
breast-cancer mastectomy cybernetics rpi rpi3b-plus sense-hat python sensor sensors data-ownership

sensebreast's Introduction

SenseBreast

Table of contents generated with markdown-toc

What is SenseBreast?

SenseBreast is a Maker Project for CECS8001 - Lab, by Kathy Reid (@kathyreid on the Twitters, GitHub, IRC etc).

It is designed to be an early prototype of a mastectomy prosthetic, and explores the concept of a cyberphysical system by having both computing-based components - "the cybers" - and physical components that are placed in close proximity to the body - "the physical".

Side note: For an excellent discussion of context and personal vs public space, see:

Haber, J., Greening, M., Castellano, L., & Wheaton, P. Proxemic Conversational UI: Moving beyond simple conversation. http://www.jonathanhaber.com/pub/gi2016.pdf

SenseBreast is open source under the Apache2 license, inspired by projects like OpenAPS. Because open source is an act of generosity - an act of contributing to the commons - a movement which is more than the sum of its individual contributions.

How do you build SenseBreast?

These instructions are provided so that SenseBreast has a reproducible build.

Where documentation for a step already exists, it is linked rather than being reproduced.

Requirements

To build SenseBreast you will need:

  • Raspberry Pi 3B+
  • Sense HAT
  • Monitor with a HDMI connection and a HDMI cable
  • USB keyboard
  • 8GB or more Micro SD card and a way to write to the card (ie Etcher)
  • Basic bash and python knowledge
  • A source of battery power - I recommand a small form factor Li-Ion pack with a Micro-USB cable to go to the Raspberry Pi. NOTE: Most of the power sources I tested resulted in 'under voltage' warnings on the RPi, but these are generally safely ignored.
  • Coffee, patience, and when that fails, your favourite curse words.

Method

Raspberry Pi

Flash the Raspbian operating system to the Micro SD card
  • Flash the Raspbian Stretch Lite operating system to your Micro SD card using a program like Etcher
  • To prove that you have a working Raspberry Pi with Rasbpian, connect the RPi to the monitor using a HDMI cable, and to the keyboard using the USB cable. Connect the RPi to a power source using the Micro USB cable. On the first boot, the RPi will display "resizing file system, rebooting in 5 seconds...". Once the RPi is powered on, you should see the device boot. Use the username pi and password raspberry to log in. If you can successfully log in, you are ready for the next steps.

NOTE: You will not have network access yet, that's the next step.

Set the localisation for your preferred keyboard layout

By default, the RPi ships with the en-GB keyboard layout, which has several different key settings, like the @ symbol and # symbol aren't where they are on an Australian keyboard. To set localisation options, type sudo raspi-config at the command line, then choose 4 - Localisation option. If you're Australian, choose en-AU, then set this as the default LOCALE. Then, set the keyboard layout to English-Australian by typing sudo raspi-config, then choosing 4 - Localisation options then I3 Change Keyboard Layout.

This will make you life easier when manually typing configurations.

Connect to a network with internet access

NOTE: This is the hardest step in hardware setup. Do not underestimate how difficult this step is. Here be dragons.

There are two methods to do this.

  • You can use sudo raspi-config from the command line, then choose 2 - Network options and enter the details for your network.

Chances are though that you're on a secure, PEAP-authenticated network, in which case this method won't work and you'll need to manually edit the wpa_supplicant.conf file. This is an exercise in pain, misery and the limits of caffeine tolerance, so the repo includes a sample wpa_supplicant.conf to protect your sanity. The tutorial here shows you how to generate a password hash for PEAP authentication.

  • cd /etc/wpa_supplicant
  • sudo mv wpa_supplicant.conf wpa_supplicant.conf.BAK # this makes a copy of the existing file in case of borkage
  • sudo nano wpa_supplicant.conf

Then, edit the wpa_supplicant.conf with the details relevant for your network. Use Ctrl + X to save. Type sudo reboot now on the command line to reboot.

If you have a working wpa_supplicant.conf file then you will be able to proceed and install other components, otherwise you will be blocked until you can get wpa_supplicant.conf working.

Install git and clone this repo

git will make setting up the SenseBreast a lot easier, because you can pull down this repo and a lot of the associated files.

sudo apt-get install git

Then, we clone this repo:

git clone https://gitlab.cecs.anu.edu.au/u6933485/sensebreast/

You will be asked for your ANU CECS GitLab username and password.

NOTE: If you have 2FA enabled on the CECS GitLab, remember to use your token instead of your raw password.

A little .bashrc hack for making ls much nicer

sudo vi ~/.bashrc

Use the / key and enter alias.

In the block of aliases, add:

alias ls='ls -las'

Then use :wq to write and quit.

Type exit then log in again, and when you use ls it will give you verbose information. Very helpful for development purposes.

Get nano to do proper syntax highlighting

If you're doing any development work on the SenseBreast using the nano editor, then you will want to create and edit a .nanorc file in the pi user's home directory.

An example .nanorc is included in the repo, which includes Python and bash syntax highlighting.

include /usr/share/nano/sh.nanorc
include /usr/share/nano/python.nanorc
Symlinking the wpa_supplicant.conf file

Once you have the repo down, you can symlink wpa_supplicant.conf to make your life easier.

cd /etc/wpa_supplicant
sudo rm wpa_supplicant.conf
sudo ln -s /home/pi/sensebreast/wpa_supplicant.conf wpa_supplicant.conf

This means that you can make changes to wpa_supplicant.conf in git such as adding a new network, and when you update the sensebreast repo using git pull, you will bring the changes down automagically.

Setting up a crontab for the pi user to run the scripts

Use the crontab program to set up scripts to run at the frequency you want. Currently the script will sense for 5 minutes then write to disk, so the example crontab is set to run the scripts every 5 minutes.

Logging

The crontab is set to log to ./log/sensebreast.log. You may wish to use this if you do any additional sensing.

_NOTE: rsyslog has been configured to log cron.d events to /var/log/cron.log, however this file is not writeable by the pi user and so commands executed under crontab will fail - this is why they are set to log to a different log file.

Install the sense-hat package for Raspbian

Using sensors

Calibrate the sensors using octave

Prosthetic form

Future directions for development

Additional sensors

It may be possible to add additional sensors, and use the pins that are not consumed by the Sense HAT.

Disk image of SenseBreast

A disk image of SenseBreast 1.0 is available

sensebreast's People

Contributors

kathyreid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

adhocsystems1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.