PSLab Android App
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: http://pslab.fossasia.org
Please join us on the following channels:
- First we need to get communication between Android App and PSLab working.
- Implement Applications and expose PSLab Hardware functionality to user.
- Implement Functionality to Perform Experiment using PSLab Hardware Device.
Feature | Description | Status |
---|---|---|
Home Screen | Show status and version of PSLab device | Established |
Application | Exposes PSLab application like Oscilloscope,etc | Established |
Oscilloscope | Shows variation of analog signals | Working |
Control | Generate waveforms and PWM signals. Control voltage and current sources and read results from a variety of electric components | Working |
Logical Analyzer | Captures and displays signals from digital system | Working |
Data Sensor Logger | Captures and displays data from various sensors | Working |
Wireless Sensor | Scans, captures and displays data from various wireless sensors | |
Sensor Quick View | Scans all the sensors connected to PSLab Device and provides interface to Log data | Working |
Settings | Enable Auto-Start | |
Saved Experiments | Access Pre-defined and Designed Experiments | Working |
Design Experiments | To Design our own experiments |
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
-
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.
-
Open Android Studio, you will see a Welcome to Android window. Under Quick Start, select Import Project (Eclipse ADT, Gradle, etc.)
-
Navigate to the directory where you saved the pslab-android project, select the "pslab-android" folder, and hit OK. Android Studio should now begin building the project with Gradle.
-
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.
-
Once all build errors have been resolved, you should be all set to build the app and test it.
-
To Build the app, go to Build>Make Project (or alternatively press the Make Project icon in the toolbar).
-
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 presing 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 : http://stackoverflow.com/questions/4893953/run-install-debug-android-applications-over-wi-fi
Note :
- If you built your own hardware, change VendorID and/or ProductID in CommunicationHandler.java
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.
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.
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 filefragment_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 tospinner_channel_select1
.