GithubHelp home page GithubHelp logo

khlaifiabilel / android-arduino-bluetooth-relay-4-channel Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 5.0 31.13 MB

Using an android app to controle your car using an arduino/raspberry embedded system

Java 90.25% C++ 9.75%
android-studio arduino java c android

android-arduino-bluetooth-relay-4-channel's Introduction

Android Studio

Android-Arduino-Automotive

GitHub followers GitHub repo size Visual Studio App Center (Minimum) OS Version GitHub contributors GitHub commit activity GitHub top language

Repository Titles

How to Install Android Studio on Ubuntu 18.04

Arduino project

How to Install Android Studio on Ubuntu 18.04

Android Studio

Android Studio is a full-featured cross-platform IDE that helps you build applications on every type of Android device. It is based on JetBrains’ IntelliJ IDEA and includes everything you need for Android development.

Android Studio build system is powered by Gradle allowing you to create multiple build variants for different devices from a single project.

This tutorial explains how to install Android Studio on Ubuntu 18.04. The same instructions apply for Ubuntu 16.04 and any Ubuntu-based distribution, including Kubuntu, Linux Mint, and Elementary OS.

Prerequisites

You’ll need to be logged in as a user with sudo access to be able to install packages on your Ubuntu system.

Installing Java OpenJDK

Android Studio requires OpenJDK version 8 or above to be installed to your system. We’ll install OpenJDK 8. The installation is pretty simple, start by updating the package index:

Installing Java OpenJDK

Android Studio requires OpenJDK version 8 or above to be installed to your system. We’ll install OpenJDK 8. The installation is pretty simple, start by updating the package index:

// Run

sudo apt update

Install the OpenJDK 8 package by typing:

// Run

sudo apt install openjdk-8-jdk

Verify the installation by typing the following command which will print the Java version:

// Run

java -version

The output should look something like this:

// The output

openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Installing Android Studio

At the time of writing this article, the latest stable version of Android Studio is version 3.3.1.0. The easiest way is to install Android Studio on Ubuntu 18.04 is by using the snappy packaging system.

To download and install the Android Studio snap package, open your terminal using the Ctrl+Alt+T keyboard shortcut and type:

// run

sudo snap install android-studio --classic

Once the installation is complete, you will see the following output:

// The output

android-studio 3.3.1.0 from Snapcrafters installed

That’s it. Android Studio has been installed on your Ubuntu desktop.

Arduino project

Arduino cover

Arduino IDE

The Arduino Integrated Development Environment is a cross-platform application that is written in functions from C and C++. It is used to write and upload programs to Arduino compatible boards, but also, with the help of 3rd party cores, other vendor development boards.

Which language is used in Arduino IDE?

The "Arduino language" is simply C++ (and therefore also C). All the standard system librarys are written in C/C++ and the IDE uses the gcc g++ compiler.

Arduino

FAQ

  • How do I do specifically so and so?
    • No problem! Just do this.

Support

Reach out to me at one of the following places!

License

android-arduino-bluetooth-relay-4-channel's People

Contributors

khlaifiabilel avatar mend-bolt-for-github[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

android-arduino-bluetooth-relay-4-channel's Issues

How to control a relay with the Raspberry Pi (solved)

Required Hardware Parts

  • 5V relay module*
  • Female – Female jumper cable*
  • an external circuit (e.g., batteries*) and an application (eg, motors)

Raspberry Pi Relay Control

I am using Python and have used GPIO 17 (pin 11)

Sudo su 

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM) # GPIO Numbers instead of board numbers
 
RELAIS_1_GPIO = 17
GPIO.setup(RELAIS_1_GPIO, GPIO.OUT) # GPIO Assign mode
GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # out
GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # on

Setup

This is very simple since all pins are labelled ( As explained in the Folder named Arduino ). Left (GND) comes to pin 6 of the Pi (GND), the right pin (VCC) comes to 3V3 (pin 1) of the Pis. Depending on how many of the relays you want to control ( As we are going to use a 4 relay module ) , we need to connect a corresponding number of GPIOs to the IN pins ( Wish are well explained in the Folder Arduino ). It is recommended to set a small resistor between the Pi and the relay, but it is not absolutely necessary with 3V3. As for the our model we are going to set 12V instead of 3.3V to VCC, you should definitely put one resistor each (~ 1kΩ) between the GPIOs and the IN pins.

Relay Setup

In each relay there are 3 connections: Depending on whether the IN pin is a LOW (0V) or HIGH (3.3V or 5V or a 12V) is applied either the switch between the centre and right, or Open centre and left. If you connect all 3 pins, you can use the relay as a kind of switch, leaving it free on the left or right has the effect of an on/off switch. Where VCC or ground are connected (middle or right/left) does not matter.

image

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.