Two mobiles. Connection Server - Client by Bluetooth. LDR trigger a relay

Hello friends,

normally we connect our mobile (or tablet) to Arduino, ESP8266, ESP32, Tiny85, ... by Bluetooth to control a device.

We are going to see how we can control a device using two Bluetooth mobiles, four LDRs and four relays.

ooooooooooooooooooooooo0000ooooooooooooooooooooooo

  • We will use a mobile and build an app to work as a Bluetooth Server. This app will have 4 buttons (up, down, left and right), it will send a number from 1 to 8 according to those buttons are TouchDown or TouchUp.

  • Another mobile will be the Bluetooth Client, it will have an application with four circles, these circles will be filled with white or black depending on the button pressed on the Server.

1 Like

- Server Bluetooth.

  • Server Bluetooth accepts connections and sends a number from 1 to 8 depending on the Button pressed.

p9C2_Servidor_BT_LDRi.aia (27.9 KB)

1 Like

- Client Bluetooth.

  • Client Bluetooth connects with Server and receives a number from 1 to 8 and fills in a ball with black or white depending on the number received.

p9C2_Cliente_BT_LDRi.aia (5.6 KB)

  • The two mobiles must be paired, this is done in Settings.
  • For them to work, it is convenient that the applications are installed (Build .apk).
1 Like

- LDR.

Here four LDR (Light Dependent Resistor).
ldr2

  • we pack those four LDRs in a cardboard, leaving a hole as the following image indicates:
    ldr3

  • We put these four LDRs on the mobile screen, on the circles of the Client application, as the image indicates:

ldr5

  • If we measure the resistance of an LDR with an ohmmeter we will observe that its value will change between 2 KΩ (when the circle is white) and 50 KΩ (when the circle is black) [Those values ​​are just examples]
1 Like

- Relay.
ldr6

  • We can connect each LDR to a relay that will be triggered according to the resistive value of the LDR.

- Proposals.

1.- Change the circles on the Server and the buttons on the Client.

2.- Perform this same technique using CloudDB or FireBase.

3.- Use a Slider component and send luminance levels (gray tones) to the LDR, measure its value with the ohmmeter.

1 Like

JoseRafael uses this method to move a small cart.

On his YouTube channel Corcinox Inventos shows us, in Spanish, all his interesting process.

1 Like