logo-mobile

ROHM

ROHM
Menu
  • Arduino –
  • Raspberry Pi –
  • Trending –
  • Others –
  • About –
  • Contact –

Arduino

Smart Robotic Arm – Part 2: Programming

Tiberia Todeila
Published by Tiberia Todeila at August 14, 2017
Categories
  • Arduino
Tags
  • Arduino
  • robotic arm
  • robotics
  • smart robotic arm
robotic arm

Table of Contents

  • Intro
  • Step 1: Making the App
  • Step 2: How to Make Demo App
  • Step 3: Properties of the App & Step 4: Face Recognition
  • Step 5: Weather API & Step 6: Text-to-Speech

Step 5: Weather API

With this Weather API we can collect data for a city by the following methods: city name, city ID, geographic coordinates and even ZIP code. This API has an advantage of being free and easy to use. But there’s a limit; you cannot make more than 60/minute or 50k/day, and if you violate them, your account will be blocked.

In this tutorial, we’ve chosen to call API by city ID. Every city has an ID found on http://bulk.openweathermap.org/sample/city.list.json.gz. The extension .json is used for exchanging data between a browser and a server. The communication can be realized only if the data is in text format.

It has been used an WebClient Class – which helps to download files easily. In our case, the constructor WebClient is used to initialize a new instance:

WebClient client = new WebClient();

We need to encode the data on UTF8, which means it uses 8-bit blocks to represent a character with: client.Encoding = System.Text.Encoding.UTF8

If the internet connection cannot be established, the program will automatically display the message “Internet Connection failed – “throw new WeatherDataServiceException” when an unexpected problem with internet connection occurs. Using throw we create an exception.

In C#, we can use try and catch for the situations when a part of the code cannot succeed.

This works with text-to-speech API –  the user asks about the weather and the response from the system is ” The weather in Boston is..”.  

Step 6: Text-to-Speech

When you are working with text-to-speech API, you need to have a file that can be processed very quickly – that’s why we need to work with a server. For BING API, an authorization token is needed and it can be found on https://api.cognitive.microsoft.com/sts/v1.0/issueToken.

This API has a validity of 10 minutes. This worked great as a timer for counting to 9 and renewing the connection every 9 minutes.

As you can see in the picture below, you can see that the final result for the text-to-speech is “Testing the app for Device Plus”.

robotic arm

Figure 13: Testing the API

It was an interesting project overall. The project taught me how important and crucial it is to have a good synchronization between hardware and software to achieve the most optimal performance. Using a lot of libraries from Visual Studio made the project a little bit complicated, but in the end, the result was satisfying.

I think a project like this can be developed and improved in many ways to address each user’s needs.

1 2 3 4 5
Tiberia Todeila
Tiberia Todeila
Tiberia is currently in her final year of electrical engineering at Politehnica University of Bucharest. She is very passionate about designing and developing Smart Home devices that make our everyday lives easier.

Check us out on Social Media

  • Facebook
  • Twitter

Recommended Posts

  • Smart Robotic Arm – Part 1: Mechanics and WiringSmart Robotic Arm – Part 1: Mechanics and Wiring
  • Guide to Connecting Arduino & Raspberry Pi + DIY Arduino and Raspberry Pi Camera Robot!Guide to Connecting Arduino & Raspberry Pi + DIY Arduino and Raspberry Pi Camera Robot!
  • Arduino Explorer Rover Part 3 – ProgrammingArduino Explorer Rover Part 3 – Programming
  • Insect-Inspired “Arthrobots” Made of Drinking StrawsInsect-Inspired “Arthrobots” Made of Drinking Straws
  • Exploring Robotics with the Hedgehog Robotics ControllerExploring Robotics with the Hedgehog Robotics Controller
  • Manta Ray-Inspired Soft Robotic FishManta Ray-Inspired Soft Robotic Fish
Receive update on new postsPrivacy Policy

Recommended Tutorials

  • How to integrate an RFID module with Raspberry Pi How to integrate an RFID module with Raspberry Pi
  • How to Use the NRF24l01+ Module with Arduino How to Use the NRF24l01+ Module with Arduino
  • How to Run Arduino Sketches on Raspberry Pi How to Run Arduino Sketches on Raspberry Pi
  • Setting Up Raspberry Pi as a Home Media Server Setting Up Raspberry Pi as a Home Media Server

Recommended Trends

  • SewBot Is Revolutionizing the Clothing Manufacturing Industry SewBot Is Revolutionizing the Clothing Manufacturing Industry
  • All About The Sumo Robot Competition And Technology All About The Sumo Robot Competition And Technology
  • 5 Interesting Tips to Calculating the Forward Kinematics of a Robot 5 Interesting Tips to Calculating the Forward Kinematics of a Robot
  • Go Inside the Drones That Are Changing Food Delivery Go Inside the Drones That Are Changing Food Delivery
Menu
  • Arduino –
    Arduino Beginner’s Guide
  • Raspberry Pi –
    Raspberry Pi Beginner's Guide
  • Trending –
    Updates on New Technologies
  • Others –
    Interviews / Events / Others

Check us out on Social Media

  • Facebook
  • Twitter
  • About
  • Company
  • Privacy Policy
  • Terms of Service
  • Contact
  • Japanese
  • 简体中文
  • 繁體中文
Don’t Forget to Follow Us!
© Copyright 2016-2023. Device Plus - Powered by ROHM
© 2023 Device Plus. All Rights Reserved. Muffin group

istanbul escort istanbul escort istanbul escort