• Stars
    star
    2,038
  • Rank 21,744 (Top 0.5 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PSLab Android App https://play.google.com/store/apps/details?id=io.pslab

PSLab Android App

Repository for the PSLab Android App for performing experiments with the Pocket Science Lab open-hardware platform.

Build Codacy Badge Mailing List Minimum API Level Maximum API Level GitHub repo size Gitter Twitter Follow

This repository holds the Android App for performing experiments with PSLab. PSLab is a tiny pocket science lab that provides an array of equipment for doing science and engineering experiments. It can function like an oscilloscope, waveform generator, frequency counter, programmable voltage and current source and also as a data logger. Our website is at https://pslab.io

Get it on Google Play Get it on F-Droid

Buy

Communication

Roadmap

  • First we need to get communication between Android App and PSLab working.
  • Implement Applications and expose PSLab Hardware functionality to the user.
  • Implement wireless connectivity

Screenshots

Video Demo

Features

Feature Description Status
Home Screen Show status and version of PSLab device ✔️
Instruments Exposes PSLab instruments like Oscilloscope, etc ✔️
Oscilloscope Shows variation of analog signals ✔️
Multimeter Measures voltage, current, resistance and capacitance ✔️
Logical Analyzer Captures and displays signals from digital system ✔️
Wave Generator Generates arbitrary analog and digital waveforms ✔️
Power Source Generates programmable voltage and currents ✔️
Luxmeter Measures the ambient light intensity ✔️
Barometer Measures the Pressure ✔️
Accelerometer Measures the acceleration of the device ✔️
Gyrometer Measures the rate of rotation ✔️
Compass Measures the absolute rotation relative to earth magnetic poles ✔️
Thermometer Measures the ambient temperature ✔️
Gas Sensor Detects gases, including NH3, NOx, alcohol, benzene, smoke and CO2 ✔️
Robotic Arm Controller Allows to control 4 servo motors of the robotic arm independently ✔️

How to set up the Android app in your development environment

Application Flavors

There are 2 flavors (build variants) of PSLab Android application.

  1. Play Store Flavor

  • Play Store flavor uses Google Maps to display location stored in logs in Data logger.
  1. Fdroid Flavors

  • Fdroid flavor uses Open Street Maps to display location stored in logs in Data logger.

Development Setup

Before you begin, you should already have the Android Studio SDK downloaded and set up correctly. You can find a guide on how to do this here: Setting up Android Studio

Setting up the Android Project

For setting up the PSLab Android project you may follow any of the two methods listed below, that is, you may download the repository zip file or you may directly clone the repository to Android Studio.

By downloading the zip file

  1. Download the pslab-android project source. You can do this either by forking and cloning the repository (recommended if you plan on pushing changes) or by downloading it as a ZIP file and extracting it.

  2. Open Android Studio, you will see a Welcome to Android window. Under Quick Start, select _Import Project (Eclipse ADT, Gradle, etc.)To debug over Wi-Fi follow the steps given in this Blog.

By direct cloning

  1. Open Android Studio, you will see a Welcome to Android window. Under Quick Start, select "check out project from version control".
  2. Select git from the drop down menu that appeared.
  3. Go to the repository and click clone or download button.
  4. From the dropdown that appeared, copy the link.
  5. Paste the URL that you copied and press clone.
  6. Android studio should now begin building the project with gradle.
  7. Once this process is complete and Android Studio opens, check the Console for any build errors.
  • Note: If you receive a Gradle sync error titled, "failed to find ...", you should click on the link below the error message (if available) that says Install missing platform(s) and sync project and allow Android studio to fetch you what is missing.
  1. Once all build errors have been resolved, you should be all set to build the app and test it.
  2. To Build the app, go to Build>Make Project (or alternatively press the Make Project icon in the toolbar).
  3. If the app was built successfully, you can test it by running it on either a real device or an emulated one by going to Run>Run 'app' or pressing the Run icon in the toolbar.

If you want build apk only, go to Build>Build apk and apk would be build and directory where apk is generated would be prompted by Android Studio.

You can't debug the usual way as PSLab device is connected to micro-USB port through OTG cable. So Android Device is not connected to PC through USB cable.

To debug over Wi-Fi follow the steps given in this Blog.

Permissions Required

  1. Record_Audio : It is required for oscilloscope to accept inputs from the phone inbuilt microphone. You can find its implementation in AudioJack.java.
  2. Access_Fine_Location and Internet : It is required for use in lux meter and compass to get the coordinates for tagging the data on the map. You can find its implementation in GPSLogger.java.
  3. Write_External_Storage : It is required for storing log files from instruments that can be transferred out for future analysis.
  4. Read_External_Storage : While writing logs in the storage, CSVLogger.java first checks whether there is any CSVLogger directory exist or not and that require this read permission.

Setup to use PSLab with Android App

To use PSLab device with Android, you simply need an OTG cable, an Android Device with USB Host feature enabled ( most modern phones have OTG support ) and PSLab Android App. Connect PSLab device to Android Phone via OTG cable. Rest is handled by App itself.

Contributions Best Practices

Code practices

Please help us follow the best practice to make it easy for the reviewer as well as the contributor. We want to focus on the code quality more than on managing pull request ethics.

  • Single commit per pull request.
  • Reference the issue numbers in the commit message. Follow the pattern Fixes #<issue number> <commit message>
  • Follow uniform design practices. The design language must be consistent throughout the app.
  • The pull request will not get merged until and unless the commits are squashed. In case there are multiple commits on the PR, the commit author needs to squash them and not the maintainers cherrypicking and merging squashes.
  • If the PR is related to any front end change, please attach relevant screenshots in the pull request description.

How to git squash?

As a tip for new developers those who struggle with squashing commits into one, multiple commits may appear in your pull request mostly due to following reasons.

  • Intentionally adding multiple commit messages after each change without just git adding.
  • Updating the current branch with the remote so a merge commit takes place.

Despite any reason, follow the steps given below to squash all commits into one adhering to our best practices.

  • Setup remote to upstream branch if not set before

$ git remote add upstream https://github.com/fossasia/pslab-android.git

  • Check into the branch related to the pull request

$ git checkout <branch-name>

  • Perform a soft reset to retain the changes while removing all the commit details

$ git reset --soft upstream/development

  • Add files to the staging area

$ git add <file paths or "." to add everything>

  • Create a new commit with a proper message following commit message guidelines

$ git commit -m "tag: commit message"

  • If you have already made a pull request

$ git push -f origin <branch-name>

Branch Policy

We have the following branches

  • development All development goes on in this branch. If you're making a contribution, you are supposed to make a pull request to development. Make sure it passes a build check on Travis.
  • master This contains the stable code. After significant features/bugfixes are accumulated on development, we move it to master.
  • apk This branch contains automatically generated apk file for testing.

Code style

Please try to follow the mentioned guidelines while writing and submitting your code as it makes easier for the reviewer and other developers to understand.

  • While naming the layout files, ensure that the convention followed is (activity/fragment) _ (name).xml like activity_oscilloscope.xml , fragment_control_main.xml .
  • Name the views and widgets defined in the layout files as (viewtype/widget) _ (fragment/activity name) _ (no. in the file) like spinner_channel_select_la1 , button_activity_oscilloscope1 .
  • The activity/fragment file name corresponding to the layout files should be named as (activity/fragment name)(activity/fragment).java like ChannelsParameterFragment.java corresponding to the layout file fragment_channels_parameter.xml .
  • The corresponding widgets for buttons, textboxes, checkboxes etc. in activity files should be named as (viewtype/widget)(fragment/activity name)(no. in the file) like spinnerChannelSelect1 corresponding to spinner_channel_select1 .

Developers

Maintainers

The project is maintained by

Alumni

License

This project is currently licensed under the Apache License 2.0. A copy of LICENSE is to be present along with the source code. To obtain the software under a different license, please contact FOSSASIA.

More Repositories

1

visdom

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.
Python
9,894
star
2

open-event-server

The Open Event Organizer Server to Manage Events https://test-api.eventyay.com
Python
2,906
star
3

phimpme-android

Phimp.me Photo Imaging and Picture Editor https://play.google.com/store/apps/details?id=org.fossasia.phimpme
Java
2,580
star
4

susi_server

SUSI.AI server backend - the Artificial Intelligence server for personal assistants https://susi.ai
Java
2,500
star
5

susi_android

SUSI.AI Android App https://play.google.com/apps/testing/ai.susi
Kotlin
2,418
star
6

open-event-frontend

The frontend for the Open Event API Server https://test.eventyay.com
JavaScript
2,313
star
7

open-event-droidgen

Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk
Java
2,048
star
8

susi.ai

SUSI.AI Web Client https://susi.ai
JavaScript
2,026
star
9

open-event-wsgen

Open Event Website App Generator https://sched.eventyay.com
JavaScript
2,013
star
10

open-event-attendee-android

Open Event Attendee Android General App https://github.com/fossasia/open-event-android/blob/apk/open-event-dev-app-playStore-debug.apk
Kotlin
1,947
star
11

star-me

Star FOSSASIA Repositories on Github and Support the Community
JavaScript
1,906
star
12

fossasia.org

FOSSASIA Website https://fossasia.org
Less
1,883
star
13

susi_iOS

SUSI AI iOS app http://susi.ai
Swift
1,870
star
14

loklak_search

Frontend Search for loklak server https://loklak.org
TypeScript
1,840
star
15

open-event-organizer-android

Open Event Mobile App for Organizers and Entry Managers https://play.google.com/store/apps/details?id=com.eventyay.organizer
Java
1,793
star
16

badgeyay

Attendee Badge Generator for Conferences
JavaScript
1,791
star
17

badge-magic-android

Badge Magic with LEDs - Android App https://play.google.com/apps/testing/org.fossasia.badgemagic
Kotlin
1,788
star
18

meilix

Beautiful Linux System https://meilix.org | APT Repo: http://meilix.fossasia.org
Python
1,779
star
19

pslab-desktop

PSLab Desktop Application https://pslab.io
JavaScript
1,770
star
20

susper.com

Susper Decentralised Search Engine https://susper.com
TypeScript
1,742
star
21

neurolab-android

NeuroLab Android https://github.com/fossasia/neurolab-android/raw/apk/neurolab-dev-debug.apk
Java
1,710
star
22

open-event

Open Event Project, Samples, Documentation and Artwork http://open-event-dev.herokuapp.com
Python
1,701
star
23

labs.fossasia.org

Projects Website for FOSSASIA http://labs.fossasia.org
CSS
1,669
star
24

query-server

Query Server Search Engines
Python
1,665
star
25

gci16.fossasia.org

FOSSASIA Google Code-In Website 2016/17 http://gci16.fossasia.org
HTML
1,659
star
26

codeheat.org

Codeheat Coding Contest Website https://codeheat.org
Less
1,639
star
27

pslab-hardware

PSLab Hardware Design and Schematics https://pslab.io
Prolog
1,633
star
28

pslab-python

Python Library for PSLab Desktop: https://pslab.io
Python
1,632
star
29

flappy-svg

Flappy Bird in SVG. Play it at http://fossasia.github.io/flappy-svg/
JavaScript
1,613
star
30

susi_linux

Hardware for SUSI AI https://susi.ai
Python
1,609
star
31

pslab-scripts

Pocket Science Lab - Scripts for Sensor Experiments
Python
1,604
star
32

gci17.fossasia.org

FOSSASIA Google Code-In Website 2017/18 https://gci17.fossasia.org
CSS
1,598
star
33

gci15.fossasia.org

FOSSASIA Google Code-In Website 2015/16 http://gci15.fossasia.org
HTML
1,596
star
34

susi_skill_cms

A web application framework to edit susi skills http://skills.susi.ai
JavaScript
1,583
star
35

2017.fossasia.org

FOSSASIA Summit 2017 https://2017.fossasia.org
HTML
1,580
star
36

2018.fossasia.org

FOSSASIA Summit 2018 https://2018.fossasia.org
HTML
1,577
star
37

fossasia-communities

FOSSASIA API Files of Communities in Asia
1,576
star
38

open-event-attendee-ios

iOS app for open event
Swift
1,570
star
39

gci14.fossasia.org

FOSSASIA Google Code-In Website 2014/15 http://gci14.fossasia.org
JavaScript
1,569
star
40

knittingpattern

A Python Library for Knitting Patterns
Python
1,569
star
41

2016.fossasia.org

FOSSASIA Summit 2016 https://2016.fossasia.org
CSS
1,564
star
42

2012.fossasia.org

FOSSASIA Summit 2012 Event Site https://2012.fossasia.org
CSS
1,563
star
43

pslab-firmware

Firmware for PSLab Open Hardware Platform https://pslab.io
C
1,559
star
44

loklak_webclient

loklak web application
JavaScript
1,553
star
45

loklak_wok_android

"loklak wok" is a harvesting peer for the loklak_server https://github.com/fossasia/loklak_wok_android/raw/apk/loklak_wok_1.2_20160201.apk
Java
1,549
star
46

susi_chromebot

SUSI.AI Chrome Extension
JavaScript
1,548
star
47

directory.api.fossasia.net

Python
1,547
star
48

yaydoc

Docs! Yay! http://yaydoc.org
JavaScript
1,546
star
49

x-mario

x-mario, the gaming distro
Shell
1,542
star
50

searss

Search to RSS tool
Python
1,542
star
51

neurolab-hardware

Neurolab Hardware
1,541
star
52

2015.fossasia.org

FOSSASIA Summit 2015 Event Site https://2015.fossasia.org
CSS
1,539
star
53

meilix-systemlock

Meilix system lock
Python
1,537
star
54

meilix-generator

WebApp for generating a custom ISO image based on Meilix http://meilix.org
HTML
1,537
star
55

2014.fossasia.org

FOSSASIA Summit 2014 Event Site http://2014.fossasia.org
HTML
1,537
star
56

phimpme-drupal

Phimp.me - Photo App on Drupal
PHP
1,534
star
57

knitlib

Knitting backend library for knitting machines
Python
1,532
star
58

labyrinth

FOSSASIA Labyrinth
JavaScript
1,532
star
59

yaydoc-artwork

Open Source Books
1,532
star
60

sg18.sciencehack.asia

UNESCO Hackathon Website at the FOSSASIA Summit Singapore https://sg18.sciencehack.asia
CSS
1,532
star
61

phimpme-wordpress

Phimp.me - Photo App on Wordpress
PHP
1,532
star
62

CommonsNet

Sharing and Transparency for WiFi Networks
JavaScript
1,531
star
63

knitweb

knitting web app frontend and backend
JavaScript
1,530
star
64

pslab-case

PSLab Case https://pslab.io
1,530
star
65

fossasia.net

FOSSASIA.net Website https://fossasia.net
HTML
1,530
star
66

2011.fossasia.org

FOSSASIA Summit 2011 Event Site http://2011.fossasia.org
HTML
1,530
star
67

unesco.sciencehack.asia

UNESCO Hackathon Website https://unesco.sciencehack.asia
CSS
1,530
star
68

pslab-expeyes

PSLab for ExpEYES - Science Experiments and Data Acquisition for Physics Education https://pslab.io
Python
1,529
star
69

susi_tweetbot

Twitter Bot for Susi http://susi.ai
JavaScript
1,529
star
70

api.fossasia.net

FOSSASIA API
JavaScript
1,529
star
71

fossasia-nodemailer

JavaScript
1,529
star
72

xmario_buildscript

x-mario build script
Shell
1,529
star
73

2023.fossasia.org

HTML
1,528
star
74

hotelxoai.com

The Open Source Hotel in the Mekong Delta in Vietnam
HTML
1,527
star
75

2010.fossasia.org

FOSSASIA Summit 2010 Event Site http://2010.fossasia.org
HTML
1,527
star
76

susi_smart_box

SUSI.AI Smart Box https://susi.ai
1,526
star
77

blog.fossasia.org

Issue Tracker for https://blog.fossasia.org
1,526
star
78

fossasia11-drupal

FOSSASIA 2011 Drupal Site
PHP
1,526
star
79

open-event-next

Open Event Frontend "Next Version" with Vue.js
TypeScript
1,525
star
80

perspektive89.com

Open Source Journal Perspektive89.com
1,525
star
81

fossasia10-drupal

FOSSASIA 2010 Drupal Site
PHP
1,525
star
82

pslab-test-jig

PSLab Test Jig - Boards to test PSLab hardware https://pslab.io
1,523
star
83

cmap.api.fossasia.net

FOSSASIA Community Map
JavaScript
1,523
star
84

fossasia.github.io

FOSSASIA.GitHub.io
HTML
1,523
star
85

feed.api.fossasia.net

PHP
1,522
star
86

loklak-webtweets

FOSSASIA Tweets with loklak http://fossasia.github.io/loklak-webtweets/
Less
1,522
star
87

foss.vn

FOSS.vn Website http://foss.vn
HTML
1,522
star
88

susi_skill_data

A storage place for SUSI.AI skills https://susi.ai
1,521
star
89

susi_fbbot

Susi Facebook Bot http://susi.ai
JavaScript
1,519
star
90

knitpat

Knitting Pattern Format
Python
1,518
star
91

jugaadfest.com

Jugaadfest in India https://jugaadfest.com
HTML
1,518
star
92

susi_desktop

Desktop Client for http://api.susi.ai
JavaScript
1,517
star
93

loklak_wp_plugins

PHP
1,517
star
94

susi_telegrambot

Susi Telegram Bot http://susi.ai
JavaScript
1,516
star
95

susi_slackbot

Ask Susi Messengers http://susi.ai
JavaScript
1,516
star
96

open-event-scraper

Google spreadsheet parsing for Open Event JSON
Python
1,516
star
97

event-collect

event website listing to Open Event format scraper and converter
Python
1,516
star
98

knitserver

JavaScript
1,515
star
99

accounts.susi.ai

Accounts Service for SUSI.AI http://accounts.susi.ai
JavaScript
1,514
star
100

loklak_tweetheatmap

Heat map with tweets by search query using Loklak API and OpenLayers 3
JavaScript
1,513
star