Cretile Connection and Net Logic with AppInventor

Hi,
I am using cretile kit to build a project via MITApp.... But the data is not sent to cretile. Both are connected to same wifi.... Rechecked the code.... But still it doesnt get connected to cretile. Can anyone help?

Welcome Priya.

This tutorial may help you with Cretile and App Inventor.

Thank you. Will go through it.

Hi,

I am using Netlogic in cretile kit and MITAPPinventer. Earlier prologic was connected using USB-OTG. Now Prologic is replaced with Netlogic. So how do I make the app control a smart device through Netlogic using IOT..... Help me out..... I can share the code details.

This is what an ai says

Replacing the Prologic module with the NetLogic module in your Cretile kit changes the communication method from wired (USB-OTG) to wireless (likely Bluetooth/Wi-Fi), as NetLogic is designed for IoT and wireless control.

Here is the step-by-step process to transition from Prologic to NetLogic in MIT App Inventor and make your smart device controllable:

  1. Hardware Setup (NetLogic)
  • Power On: Connect power to the NetLogic block.
  • Connection Method: Unlike Prologic, which requires a physical USB-OTG cable, NetLogic communicates wirelessly (Bluetooth 5.0 or Wi-Fi). Ensure your Android phone has Bluetooth turned on.
  • Pairing: Search for new Bluetooth devices in your phone's settings and pair with the NetLogic module.
  1. Update the MIT App Inventor Project

You need to change the communication component from "Serial" (used for USB) to "Bluetooth" (used for Wireless).

  1. Remove Old Components: In the MIT App Inventor Designer view, delete the Serial component or any USB-related extension used for the Prologic.
  2. Add Bluetooth Client: From the Connectivity palette, drag a BluetoothClient component onto your screen.
  3. Add Bluetooth Selector: Drag a ListPicker button. Set its text to "Connect Device" or "Scan".
  4. Update Blocks (Logic):
  • Populate List: On the BeforePicking event for the ListPicker, set its Elements to BluetoothClient1.AddressesAndNames.
  • Connect: On the AfterPicking event for the ListPicker, set BluetoothClient1.Connect to ListPicker1.Selection.
  • Send Command: To control a smart device (e.g., turn on a light), use BluetoothClient1.SendText or SendBytes when a button is clicked in your app.
  1. Install Required Software
  • Cretile Service App: You must install the CretileService.apk on your phone to facilitate IOT communication.
  • NetLogic USB Driver: Even though you are using it wirelessly for control, you may need the NetLogic USB driver installed on your computer for initial programming via USB.
  1. Programming NetLogic (Arduino IDE/Ardublock)

You may need to update your Arduino code to listen for Bluetooth commands rather than USB serial commands.

  • Ensure the code is configured to read input from the Bluetooth module rather than the USB serial port.
  • If using Ardublock, look for Bluetooth/Wireless block components.
  1. Summary of Differences
Feature Prologic NetLogic
Connection USB-OTG Cable Bluetooth/Wi-Fi
App Inventor Serial Component BluetoothClient Component
Flexibility Wired (Local) Wireless (Remote)

By updating the BluetoothClient in MIT App Inventor and pairing the NetLogic module, your existing control logic should work similarly, but without the physical cable.

Does the ai's advice work? :thinking: I have no idea; let us know.