Experiment no. 5

  • E5.1 Name:


  • Apple Siri - Active modules for RPi



  • E5.2 Overview, purpose.


  • The laboratory experiment aims to present a way to design and create objects that can be activated by voice commands compatible with Apple HomeKit. The resources available for voice processing, the components designed to perform voice commands, as well as the implementation details of "things" that can be activated by Apple Siri are explored. At the end of the experiment, important information will be held regarding the Apple-Google resources that allow the development of intelligent actuators capable of being controlled by voice, regardless of their location, provided they have an Internet connection.

  • E5.3 Resources:


  • iPhone, Raspberry Pi platform zero,2/3/4, LED,.
    Software:
    SiriControl



    br br br br
  • E5.4 Example program sources:

  • SiriControl blue LED activation
    SiriControl green LED activation
    SiriControl red LED activation



  • E5.5 How to conduct/follow up the experiment:

  • The Siri application present on Apple iPhones, through the "Note" option, allows to convert the pronunciation of words into ASCII equivalents available as an email message placed in Gmail. These messages can be queried and, depending on the words contained, specific actuators can be developed according to the recommendations for using the SiriControl application. They can constitute template/model projects.


    An example of an actuator made with a 3 W RGB LED is shown in the figure below.



  • The Siri application must be configured so that it sends, after the Note command, an email to a Gmail account with 2 levels of security. To ensure a high level of security, it is necessary to have a sender email account set up with the possibility of accessing through 2 levels of passwords according to the specifications below:



    After activating this option, a 2nd password will be generated for accessing the client that will send the email. Programs that will access this client will use this new password which, as a rule, is 16 characters long, ensuring an increased level of security.

    This operation can be performed according to the following specifications.

    Notes messages made by the Siri application will be visible in Gmail-Notes.


    In Apple iCloud, the previous address is inserted through the options:

    Settings > Notes > Accounts > Add Account on your iOS device, and add your new Gmail account.



    Transfer the SiriControl application to the Raspberry Pi as follows:

    >sudo apt-get update
    >sudo apt-get install git-core
    > git config --global http.sslVerify false
    > git clone https://github.com/theraspberryguy/SiriControl-System

    The siricontrol.py application loads and executes the files with the py extension existing in the SiriControl/modules directory.
    Dedicated applications are created according to the following prototype.

    Designing command modules - Python programs:

    Each module is associated with a name: “moduleName”
    The command words are established in the section: “commandWords”
    The functions that will be executed after recognizing the words are inserted in the section: execute(command)
    Solve the proposed problems:

  • E5.6 Proposed problems:


  • 1. Create a Python module that will allow you to generate a periodic signal at the GPIO with a duration of 50 ms and a 10% duty cycle that will be highlighted with the oscilloscope.
    2. Create a python module that will generate a 101 sequence on the GPIO with a 1 Wire protocol, visible on the oscilloscope.
    3. Create a Python module that will generate a periodic signal on the GPIO with an increasing duty cycle (0-100&) and a duration of 10ms;
    4. Create a module for SiriControl that will generate a periodic signal with a duration of 20 ms and a 2% duty cycle.
    5. Create a module for SiriControl that will generate control signals for a steppper motor connected to the Rpi according to the following diagram :



  • E5.7 The experiment can be extended for:

  • - Development of voice-controlled car accessories;
    - Development of equipment/work interfaces for injured/disabled people;
    - Creation of critical components for emergency situations;
    - Extension of Apple HomeKit;


  • E5.8 Documentary references:


  • © 2010-2026 - Embedded Advanced Computer