Skip to content

Commit

Permalink
Minor changes in Android application and addition of Android GIF. 🌟
Browse files Browse the repository at this point in the history
  • Loading branch information
Dheeraj1998 committed Apr 30, 2019
1 parent 0a8c14d commit 15e622e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 267 deletions.
4 changes: 2 additions & 2 deletions Data_Acquisition_Arduino/Data_Acquisition_Arduino.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);

// Sets the trigPin on HIGH state for 10 micro seconds
// Sets the trigPin on HIGH state for 10 microseconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// Reads the analogPin, returns an analog value in integer format
// Reads the analogPin and returns an integer analog value
analog_value = pulseIn(analogPin, HIGH);

// Printing the analog value
Expand Down
253 changes: 0 additions & 253 deletions Data_Analysis_Python/Untitled.ipynb

This file was deleted.

2 changes: 1 addition & 1 deletion Data_Visualisation_Android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

public class InsightActivity extends FragmentActivity {

private boolean help_displayed = false;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -33,8 +31,9 @@ protected void onCreate(Bundle savedInstanceState) {

TextView fetch_btn = findViewById(R.id.fetch_btn);

//region Highlight code
HighlightManager highlightManager = new HighlightManager(this);
// highlightManager.reshowAllHighlights();
highlightManager.reshowAllHighlights();

highlightManager.addView(R.id.tv_m2).setTitle(R.string.title_1)
.setDescriptionId(R.string.highlight_1);
Expand All @@ -44,15 +43,15 @@ protected void onCreate(Bundle savedInstanceState) {
.setDescriptionId(R.string.highlight_3);
highlightManager.addView(R.id.fetch_btn).setTitle(R.string.title_4)
.setDescriptionId(R.string.highlight_4);
//endregion

final DatabaseReference database_rf = FirebaseDatabase.getInstance().getReference();

final Handler handler = new Handler();

//region Firebase data fetching code
fetch_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((AnimationDrawable) findViewById(R.id.sensorBtn).getBackground()).stop();
findViewById(R.id.sensorBtn).setBackgroundResource(R.drawable.animation_gradient_red);

View img = findViewById(R.id.sensorBtn);
Expand All @@ -79,7 +78,6 @@ public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
temp_double_value = (float) temp_int_value / 100;
textView_m3.setText(Html.fromHtml("<b>" + temp_double_value + "%</b>" + "<br><small>Wood</small>"));

((AnimationDrawable) findViewById(R.id.sensorBtn).getBackground()).stop();
findViewById(R.id.sensorBtn).setBackgroundResource(R.drawable.animation_gradient);

View img = findViewById(R.id.sensorBtn);
Expand All @@ -96,5 +94,6 @@ public void onCancelled(@NonNull DatabaseError databaseError) {
}, 2500);
}
});
//endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginTop="5dp"
android:text="PEHCHAAN"
android:textAlignment="center"
android:textColor="@color/gradientcolorMid"
android:textSize="32sp"
android:textSize="28sp"
android:textStyle="bold" />

<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:text="The Identifier"
android:text="the identifier"
android:textAlignment="center"
android:textColor="@color/gradientcolorStart"
android:textSize="22sp" />
android:textSize="18sp" />

<RelativeLayout
android:layout_width="match_parent"
Expand Down
Binary file added Pictures/Android Application.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pictures/App Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Pehchaan - The Identifier

<p align = "center"><img src="Pictures/App Logo.png" width = 10%"></img></p>

_Pehchaan_ is the Hindi term for *"recognise"*.

In this project, we devise a novel method for **detection of the material of an object**. This proof-of-concept consists of an ultrasonic sensor being kept at an established distance from the material. The various steps in this method include:
Expand All @@ -14,7 +16,7 @@ In this project, we devise a novel method for **detection of the material of an
<p align = "center"><img src="Pictures/Experimental Setup.jpeg" width="49%"></img> <img src="Pictures/Working.gif" width="49%"></img></p>

## Android application

<p align = "center"><img src="Pictures/Android Application.gif"></img></p>

## Results

Expand Down

0 comments on commit 15e622e

Please sign in to comment.