Giter Site home page Giter Site logo

paper-signals's Introduction

This project is no longer actively maintained by the Google Creative Lab but remains here in a read-only Archive mode so that it can continue to assist developers that may find the examples helpful. We aren’t able to address all pull requests or bug reports but outstanding issues will remain in read-only mode for reference purposes. Also, please note that some of the dependencies may not be up to date and there hasn’t been any QA done in a while so your mileage may vary.

For more details on how Archiving affects Github repositories see this documentation .

We welcome users to fork this repository should there be more useful, community-driven efforts that can help continue what this project began.

Paper Signals

Paper Signals is a Voice Experiment that lets you make little voice controlled objects that track simple things, like weather. You can build any of the example Paper Signals we have on g.co/papersignals, or use this repo to make your own Custom Signal.

PaperSignals

This is an experiment, not an official Google product. We will do our best to support and maintain this experiment but your mileage may vary.

Technology

Paper Signals is built on Actions on Google, the platform that allows you to make things for the Google Assistant and the Google Home. It uses Dialogflow to handle understanding what the user says, Firebase Cloud Functions and Firebase Database for backend code and storing data, and Arduino for programming the electronics.

This repo contains the Arduino files used to make API calls and move servos. This lets users set up their own individual signals using the same Firebase and Actions backend that our pre-made examples use.

Instructions for how to set up one of the pre-made, example signals can be found at g.co/papersignals (including a more detailed explanation for setting up the electronics). Below in this README, we include instructions on how to make a Custom Signal and set up a Custom Intent.

Custom Intents

Custom Intents allow you to program your Paper Signal to track anything with a few lines of code and voice commands. Creating and programming a custom intent can be done in 4 steps.

  1. Open the Paper Signals code in Arduino and use the tabs to open the APICalls.h file.

  2. Give your custom intent a name and replace the text “YOUR_CUSTOM_INTENT_NAME” with your custom intent’s name! Setting Custom Intent Name

  3. Use the tabs on the top of the Arduino Software to open the APICalls.cpp file.

  4. Find the function called CustomExecution() Find CustomExecution()

  5. Any code written in this function will run when you ask Paper Signals to run your custom intent. The variable CustomIntentData is a string that represents any parameter you gave your custom intent.

  6. To run your custom intent, open Paper Signals and say “Talk to Paper Signals”, then “Create a new Signal called Custom Signal.” Once you have that created, say “set my Custom Signal to a custom intent named

    • Example: “Set my Custom Signal to a custom intent named power.” In this example, Custom Signal is the signal name and Power is the custom intent name.
  7. To set a parameter for your custom intent to use, say: “Set the custom Parameter for Custom Signal to

    • Example: set the custom parameter for Custom Signal to Fast. In this example, Custom Signal’s custom intent is going to use Fast as a custom Parameter

Programming Your Custom Intent Functions

You will usually want to move servos and check online APIs with your custom intents, so there are 2 chunks of very useful code to understand.

  • Getting API Data

    • The code below shows the standard Paper Signals boilerplate for grabbing data from a remote API. This particular examples shows how we get rocket launch times as a string!API Boilerplate
  • Moving Servos

    • Paper Signals has a function for moving a servo with default settings. The position argument of this function takes an angle between 0 and 180 (This is the angle that the servo will move to), and speed takes an integer. Speed is actually the amount of time spent on each single angle of the servo. So a lower speed value will make the servo move faster. define MoveServoToPosition()
    • The example below moves the servo to 20 degrees, spending 10ms on each degree between the angle the servo is started at and the destination. Use MoveServoToPosition()

Contributors

Made by Isaac Blankensmith, Dylan Fashbaugh, Jacob Keith, and James DeVito with Smooth Technology and friends at the Google Creative Lab.

Other Contributors

License

Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Final Thoughts

We encourage open sourcing projects as a way of learning from each other. Please respect our and other creators’ rights, including copyright and trademark rights when present, when sharing these works and creating derivative work. If you want more info on Google's policy, you can find that here.

paper-signals's People

Contributors

dfashbaugh avatar jmzjmzjmz avatar kacobjeith avatar mrayinteractive avatar nicolehe avatar proppy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paper-signals's Issues

connecting to gweb-paper-signals.firebaseio.com failed

I use my iPhone as a hotspot, and I can connect to console.firebase.google.com with my iPhone(use shadowsocks to connect to Google).

image
image

ESP8266 UART message showed that WiFi connection is fine.

............
WiFi connected
IP address: 172.20.10.2
connecting to gweb-pape

but I can't connect to firebase as below:

connecting to gweb-paper-signals.firebaseio.com
connection failed
parseObject() failed
Default

image

Did I miss any settings?

My modification of code is just as below:

image

Upload error on Nodemcu ESP 8266

I tried uploading the code with the correct signal id at all different baud rates.
I am getting these errors all the time -

Arduino: 1.8.5 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Sketch + WiFi Settings, 921600"

Build options changed, rebuilding all
Archiving built core (caching) in: C:\Users\admin\AppData\Local\Temp\arduino_cache_418121\core\core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,FlashSize_4M1M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_None____,FlashErase_sdk,UploadSpeed_921600_5f03886daecb6caa97d15be6e5b3cbfc.a
Sketch uses 348960 bytes (33%) of program storage space. Maximum is 1044464 bytes.
Global variables use 38264 bytes (46%) of dynamic memory, leaving 43656 bytes for local variables. Maximum is 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_open failed

Have I made any mistakes?

DynamicJsonBuffer Issue

I followed all the directions when on Connect your Paper Signal when I got to step 7 and I tried to upload I got an error proclaiming

'DynamicJsonBuffer' was not declared in this scope

wonder what I did wrong, a or more likely what information might be usefull in solving this

Some issues, notes :)

OK, so i got it working, is pretty cool. Have some cool ideas for new signals. These were the issues/bugs I found:

(1) From the documentation and code it seems that the signal unique id has to be uppercase, turns out it has to be lower case. This is confusing especially with point 2
(2) The unique code it reads back, is said too quickly, especially if I'm trying to write it down. Some of the words also didn't sound right. I ended up checking my google activity logs for the actual words.
(3) When you create a new signal, it asks you to say 'I'm ready' to start back reading the code. I have a bit of a speech impediment (can't say r properly) and it was a nightmare to get past that point. Maybe a simple yes or no to continue for getting code. also maybe repeat the code?
(4) It seemed to get confused sometime, not sure if you guys have access to the discussions, but if you do you will see it.

I get that its a concept/prototype/new thing so issues to be expected, just giving feedback on what I found :)

Countdown Signal is now up and running and will be trying the others in the next couple of days.

T

Three word identifier from Google Assistant

Hi,

I am trying out this project but I get stuck retrieving the three word identifier from Google Assistant as described in the steps. (it doesn't work) I attached a screenshot of this step. Can anybody help me with this?
screen shot 2017-12-22 ps

Paper signal in germany?

I tried to start the signal service in germany. The language is english(us) on the phone, but it does not work, like the person from belgium. Is the service in germany availabel?

Countdown for undefined undefined

After getting through the setup, and testing the servo, my countdown timer is now saying "counting down to undefined undefined". It swing back and forth a couple times and then doesn't move.
Screenshot_20190908-073817

Not sure that this works anymore

Due to the deprecation of the Dark Sky API, and the fact that "Talk to Paper Signals" triggers no response from Google Assistant, I couldn't get the Paper Signals to work.

Next time I won't wait 3 years before starting a project 😅

Unable to compile code

I'm unable to compile the code from here.
The first error is:
APICalls.h:23:18: fatal error: Time.h: No such file or directory

Not a big deal. Apparently, I had to change it to sys/time.h and it worked. The error did go away but, a new error was thrown later.

APICalls.cpp:275: error: no 'void PaperSignals::StretchBreakExecution(String)' member function declared in class 'PaperSignals'
 void PaperSignals::StretchBreakExecution(String JSONData)
                                                         ^
sketch/APICalls.cpp: In member function 'void PaperSignals::ParseIntentName(String, String)':
APICalls.cpp:692: error: 'StretchBreakExecution' was not declared in this scope
     StretchBreakExecution(JSONData);
                                   ^
Multiple libraries were found for "Servo.h"
 Used: /root/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Servo
 Not used: /home/karan/arduino-1.8.5/libraries/Servo
exit status 1
no 'void PaperSignals::StretchBreakExecution(String)' member function declared in class 'PaperSignals'

I did check the code and StretchBreakExecution was indeed present in APICalls.cpp but it still does not recognize it. I did try to check if something was wrong with the braces and the indentation but, I'm afraid, that's not the case. Any suggestions?

Can't get Google assistant to launch paper signals

Hi, i'm not sure that this is the right place to ask this but when i say to my assistant "talk to paper signals", he just respond with an internet link or some pictures of the project.

Since i'm french, i tried the french version for this sentence or to write it down instead of saying it but it doesn't work either.
Am i missing something ?

Paper-Signals Google assistant

When I say , "“Talk to Paper Signals.” Then, say ‘Create a new Paper Signal’. From there, you’ll receive a unique 3-word identifier." I only get a website.

HTTPS API not working with 301

Hi 👋

I'm trying to call the Github API which uses https but when I do so I get a 301 (moved permanently) most likely because its upgrading the http to https. I'm using getJsonHTTP and I tried using getJson but that fails. My code looks like:

char*  githubHost = "api.github.com";
  String githubURL = "/repos/adamocarolli/paper-signals/commits";
  String githubPayload = getJsonHTTP(githubHost, githubURL);
  Serial.print("GitHub Payload: "); Serial.println(githubPayload);

Wondering if someone knows how I can modify or create a new function that uses https called getJsonHTTPS?

Countdown Timer - Not Couting

Have set up a countdown signal following all the instructions. When I set a timer, the servo moves to 180*, to 0*, stops, stays there and begins to heat up. This is my first arduino project and am not sure where to begin to troubleshoot!

Have tried counting down to a date and even for 30 seconds - same result for all.

Countdown time, only counting down seconds

When I say "Ask paper signals to set a timer for 60 seconds," all is well. It counts down. Same goes for "120 seconds" ("one-twenty", not "one hundred twenty"). However if I say "Ask paper signals to set a timer for one minute" it does not work. The servo wobbles back and forth, as it does when you first set a timer, but does not follow through on the countdown. I've tried various amounts of time in both seconds and minutes, and whatever the variation, the problem still persists. Yes to seconds, no to minutes. The issue also seems to exist when asking for longer countdowns, such as an hour, or to a particular time or date. I recognize that for some of these longer countdowns I may not be aware that the servo is moving since I'd imagine it's moving so slowly.

Google Assistant not recognizing command "talk to paper signals"

Assistant on Android phone is set to English. When I say "talk to paper signals" it only brings up paper signals results in Google search. I tried the same command on my Google Home and it had no idea what I was talking about. I cannot get the 3 words to make my signal function.

Signals not communicating

Signals firebase json is showing that our device has been tested as usable and reports as the proper type/name, but the device is not communicating.

Process to reproduce:

  • Create a paper signal
  • Get the 3 word signal ID
  • upload the code to your esp8266 with three word signal ID
  • Use google assistant to test your paper signal once the code has been uploaded to your esp, your device has rebooted, and your device has properly joined the wifi network.

Expected Result:

  • Servo motor sweeps

Actual Result:

  • Nothing happens

Does this still work?

The first time I did "Talk to paper signals" there were already 12 signals and it seems like none of them work and I cannot get any of them to even run the servo test. I've tried about 6 of the setup codes, but no difference. Is the service still running?

It looks like the error is BSSL:_wait_for_handshake: failed BSSL:Couldn't connect. Error = 'Certificate is expired or not yet valid.'

Servo arm not moving

Everything appears to have uploaded correctly:

Screen Shot 2020-01-14 at 2 04 12 PM

Seeing the steady blue light and flashing red but the Servo arm doesn't move when testing arrow signal via Paper Signals (barchart api is in pace as well). The wifi, and signal ID are added correctly. Could this be a hardware issue?

Can't get Google Assistant/Paper Signals Link Completed

Got my countdown paper signal built, setting up the code. Next step is getting the unique 3-word identifier. Google assistant takes me to paper signal that tells me about the paper signal website and then asks me do I want to build a countdown,pants, etc. When I reply, it just sits there until google assistant comes back and says that paper signals isn't responding right now, please try again soon :(

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.