<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cesardaher</id>
	<title>Medien Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cesardaher"/>
	<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/Special:Contributions/Cesardaher"/>
	<updated>2026-06-12T06:39:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113810</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113810"/>
		<updated>2020-03-10T00:19:22Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* The concept */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|500px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
The Arduino file for this project can be downloaded here: &lt;br /&gt;
&lt;br /&gt;
[[File:TCLM.ino]] (Uploaded on 9. March 2020)&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API library] for Arduino;&lt;br /&gt;
* Adafruit NeoPixel library for Arduino&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Prototyping&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library (Adafruit NeoPixel library). It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
check.toLowerCase();&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM.ino&amp;diff=113809</id>
		<title>File:TCLM.ino</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM.ino&amp;diff=113809"/>
		<updated>2020-03-10T00:17:52Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
== Copyright status: ==&lt;br /&gt;
&lt;br /&gt;
== Source: ==&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113808</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113808"/>
		<updated>2020-03-09T13:45:10Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Prototyping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|500px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM.ino]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API library] for Arduino;&lt;br /&gt;
* Adafruit NeoPixel library for Arduino&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Prototyping&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library (Adafruit NeoPixel library). It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
check.toLowerCase();&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113807</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113807"/>
		<updated>2020-03-09T11:24:28Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|500px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM.ino]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API library] for Arduino;&lt;br /&gt;
* Adafruit NeoPixel library for Arduino&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library (Adafruit NeoPixel library). It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113806</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113806"/>
		<updated>2020-03-09T11:23:24Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|500px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API library] for Arduino;&lt;br /&gt;
* Adafruit NeoPixel library for Arduino&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video07.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library (Adafruit NeoPixel library). It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113805</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113805"/>
		<updated>2020-03-08T22:10:06Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Twitter-Controlled LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|500px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API library] for Arduino;&lt;br /&gt;
* Adafruit NeoPixel library for Arduino&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library (Adafruit NeoPixel library). It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113804</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113804"/>
		<updated>2020-03-08T21:58:22Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API library] for Arduino;&lt;br /&gt;
* Adafruit NeoPixel library for Arduino&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library (Adafruit NeoPixel library). It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113803</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113803"/>
		<updated>2020-03-08T21:57:51Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API library] for Arduino;&lt;br /&gt;
* Adafruit NeoPixel library for Arduino&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113802</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113802"/>
		<updated>2020-03-08T21:56:56Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113801</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113801"/>
		<updated>2020-03-08T21:56:09Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply. The way it&#039;s connected to the microcontroller is as follows:&lt;br /&gt;
&lt;br /&gt;
DIN -&amp;gt; D6&lt;br /&gt;
5V -&amp;gt; 5V (Power Supply)&lt;br /&gt;
GRD -&amp;gt;GRD (Power Supply)&lt;br /&gt;
GRD (ESP8266) -&amp;gt; GRD (Power Supply)&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video01.mp4&amp;diff=113800</id>
		<title>File:TCLM video01.mp4</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video01.mp4&amp;diff=113800"/>
		<updated>2020-03-08T21:53:47Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: Cesardaher uploaded a new version of File:TCLM video01.mp4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
== Copyright status: ==&lt;br /&gt;
&lt;br /&gt;
== Source: ==&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113799</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113799"/>
		<updated>2020-03-08T21:48:16Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|400px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video03.mp4&amp;diff=113798</id>
		<title>File:TCLM video03.mp4</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video03.mp4&amp;diff=113798"/>
		<updated>2020-03-08T21:47:11Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
== Copyright status: ==&lt;br /&gt;
&lt;br /&gt;
== Source: ==&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113797</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113797"/>
		<updated>2020-03-08T21:46:47Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video03.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
In this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113796</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113796"/>
		<updated>2020-03-08T21:21:04Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 3x3 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄&lt;br /&gt;
 that&#039;s right #Elizabeth @▄▄▄▄▄ Call 1-800-Jason&lt;br /&gt;
@▄▄▄▄▄ not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@▄▄▄▄▄ @▄▄▄▄▄ You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113795</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113795"/>
		<updated>2020-03-08T21:18:05Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. The reason for that is that the Twitter API search is case unsensitive, but the Arduino indexOf() function, used to detect the directional words in the tweet is case sensitive. To fix this, I added the toLowerCase() function to turn former case unsensitive. That way, tweets with &amp;quot;UP&amp;quot; or &amp;quot;DOwn&amp;quot; for example should still be able to trigger a new LED.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113794</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113794"/>
		<updated>2020-03-08T21:16:44Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//previous&lt;br /&gt;
else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
//new&lt;br /&gt;
else if (check.toLowerCase().indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113793</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113793"/>
		<updated>2020-03-08T21:09:22Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* The concept */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
The conceptual interest in developing this project is the idea of having an unconscious collaborative experience. Through Twitter, users can engage in fast and easy communication with friends, but also with people all around the world. There is a lot of fear regarding how the data generated though Twitter and other social media platforms can be used to profile people, creating an environment that lacks privacy. However, since common people such as myself also have access to this data, it is possible to think of harmless interactions using it. In this case, people are unconsciously participating and influencing this project when they produce tweets with directional words. Though just an experiment, the principles used in this project could serve as reference for ways in which we can use social media to create collective artworks.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up pin is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113792</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113792"/>
		<updated>2020-03-08T20:56:53Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** LEDs;&lt;br /&gt;
** 220 resistors;&lt;br /&gt;
** Power supply module;&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Adafruit WS2812 8x8 Matrix&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up pin is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113791</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113791"/>
		<updated>2020-03-08T20:54:36Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up pin is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//reassign new tweet and previous tweet &lt;br /&gt;
    old_msg = search_msg;&lt;br /&gt;
    search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
        rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
        columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113790</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113790"/>
		<updated>2020-03-08T20:53:54Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 8x8 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up pin is not changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      //reassign new tweet and previous tweet &lt;br /&gt;
      old_msg = search_msg;&lt;br /&gt;
      search_msg = std::string(text.c_str(), text.length());&lt;br /&gt;
&lt;br /&gt;
//change indexes if there is a new tweet&lt;br /&gt;
    if (search_msg != old_msg){&lt;br /&gt;
    rowIndex(findDirVer(search_msg.c_str()));&lt;br /&gt;
    columnIndex(findDirHor(search_msg.c_str()));&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113789</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113789"/>
		<updated>2020-03-08T20:49:58Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Commanding */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113788</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113788"/>
		<updated>2020-03-08T20:49:15Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;&#039;Twitter-Controlled LED Matrix&#039;&#039;&#039;=&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The concept&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Requirements&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;References&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Development&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113787</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113787"/>
		<updated>2020-03-08T20:48:01Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Twitter search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Twitter search&#039;&#039;&#039;===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113786</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113786"/>
		<updated>2020-03-08T20:47:47Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* LED matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;LED matrix&#039;&#039;&#039;===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113785</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113785"/>
		<updated>2020-03-08T20:47:33Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Commanding */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Commanding&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113784</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113784"/>
		<updated>2020-03-08T20:47:15Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* 3x3 LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;3x3 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113783</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113783"/>
		<updated>2020-03-08T20:46:41Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Prototype */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototyping==&lt;br /&gt;
&lt;br /&gt;
===3x3 LED Matrix===&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;8x8 LED Matrix&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I used a Adafruit WS2812 8x8 Matrix instead. This LED Matrix has the advantage of being built-in for microcontroller use, with many functions available in its library. It also has the advantage of using only three pins and having no need for additional resistors, which made its connection very easy. The downside is that it needs an external power supply.&lt;br /&gt;
&lt;br /&gt;
For this version, there is no need to assign digital pins to each LED. Instead, I assigned one digital pin and the number of &amp;quot;pixels&amp;quot; in the matrix. With that, each pixel is assigned a number (from 0 to 63), going from left to right and top to bottom. Because of that, I arranged a 2D 8x8 array containing each pixel, so that I could reuse the previous functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PIN D6 &lt;br /&gt;
#define NUMPIXELS 64&lt;br /&gt;
&lt;br /&gt;
const int rows = 8;&lt;br /&gt;
const int columns = 8;&lt;br /&gt;
uint8_t pinVal[rows][columns] = &lt;br /&gt;
{ { 0, 1, 2, 3, 4, 5, 6, 7 }, &lt;br /&gt;
{ 8, 9, 10, 11, 12, 13, 14, 15 }, &lt;br /&gt;
{ 16, 17, 18, 19, 20, 21, 22, 23 },&lt;br /&gt;
{ 24, 25, 26, 27, 28, 29, 30, 31 },&lt;br /&gt;
{ 32, 33, 34, 35, 36, 37, 38, 39 },&lt;br /&gt;
{ 40, 41, 42, 43, 44, 45, 46, 47 },&lt;br /&gt;
{ 48, 49, 50, 51, 52, 53, 54, 55 },&lt;br /&gt;
{ 56, 57, 58, 59, 60, 61, 62, 63 }};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To deal with the duplicate tweets, in this version I also changed&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113782</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113782"/>
		<updated>2020-03-08T18:30:23Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Prototype */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
In this upgraded version below, the setup is the same, but the code was modified in a way that the jump from one LED to the next happens without delay, though it is still slow (the video is sped up to 2x).&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video02.mp4&amp;diff=113781</id>
		<title>File:TCLM video02.mp4</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video02.mp4&amp;diff=113781"/>
		<updated>2020-03-08T18:19:44Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
== Copyright status: ==&lt;br /&gt;
&lt;br /&gt;
== Source: ==&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113780</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113780"/>
		<updated>2020-03-08T18:19:18Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Prototype */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video02.mp4|300px]]&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113779</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113779"/>
		<updated>2020-03-06T00:07:35Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Prototype */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113778</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113778"/>
		<updated>2020-03-06T00:07:09Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Prototype */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_video01.mp4|300px&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video01.mp4&amp;diff=113777</id>
		<title>File:TCLM video01.mp4</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:TCLM_video01.mp4&amp;diff=113777"/>
		<updated>2020-03-06T00:06:05Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
== Copyright status: ==&lt;br /&gt;
&lt;br /&gt;
== Source: ==&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113775</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113775"/>
		<updated>2020-03-05T22:33:10Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* LED matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
The forementioned matrix has the size of 3x3, and the LEDs are stored in the code as a 2D array. That way, they were able to be lit up by having their indexes called.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113774</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113774"/>
		<updated>2020-03-05T22:31:21Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Twitter search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. &lt;br /&gt;
The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained in the beginning, this project uses a light matrix in which only one LED is lit up at a time. The program starts with the top-left one and, as tweets are collected, the directional words are used to define what is next one to be lit.&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113773</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113773"/>
		<updated>2020-03-05T22:26:03Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Twitter search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first function was used in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, making the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113772</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113772"/>
		<updated>2020-03-05T22:23:50Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a game from the Pokémon franchsie is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113771</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113771"/>
		<updated>2020-03-05T18:24:52Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Prototype */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need correction. First of all, the delay between each search is quite high (10 seconds) which makes it tedious to watch. Second, there is a big delay between turning off a LED and lighting up the next, besides the 10 seconds gap. Finally, many of the commands were issued repeatedly because of repeated tweets. &lt;br /&gt;
&lt;br /&gt;
By changing the delay between searches, I realized that the ideal delay is actually the default found in the library example: 20 seconds. Setting this value lower makes it more likely that the program will retrieve the same tweet repeatedly. On the other hand, I was able to modify the program structure to minimize the delay between LEDs lighting up. Though the device is not working fast, it is at least visually smooth.&lt;br /&gt;
&lt;br /&gt;
For the next prototype, I want to work with a bigger matrix, and try to make the tweet search smoother and faster. Ideally, I would be able to only issue commands to the microcontroller with the arrival of a new tweet.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113770</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113770"/>
		<updated>2020-03-05T18:10:54Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Twitter-Controlled LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions were adapted and used both for columns and rows and can be expanded into different sized matrixes.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
The first prototype was built on a breadboard using basic components attached to ESP8266. Below it, there is the list of tweets used to move the LED light.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_video01.mp4|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;my parents r bout to put my ass up for adoption&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@GeneralHospital&lt;br /&gt;
 that&#039;s right #Elizabeth @RebeccaLHerbst Call 1-800-Jason&lt;br /&gt;
@1SteveBurton not the police&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG: &amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
down&lt;br /&gt;
nor left nor right&lt;br /&gt;
MSG:&amp;quot;I wrote another post (on Warwick&#039;s blogging platform)&lt;br /&gt;
&lt;br /&gt;
I do have one coming up on my personal blog. I&#039;m just finalising it and that will hopefully be up by the end of the week!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nor up nor down&lt;br /&gt;
right&lt;br /&gt;
MSG: &amp;quot;@Mylesvance09 @DLovesRasslin You’re right; he don’t know bout that life&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prototype showed that the functions worked as intended, but showed some parts that would need corerction.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113769</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113769"/>
		<updated>2020-03-05T17:46:47Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Commanding */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These examples were used both for columns and rows and can be expanded into different sized matrixes.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113768</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113768"/>
		<updated>2020-03-05T17:45:54Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Commanding */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
This logic was translated into the following function (for columns):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//check is the retrieved tweet&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, since the LEDs are declared in a 3x3 array, the indexes mustn&#039;t ever exceed 2 or go below 0. Therefore, the function for applying the index change was written taking these cases into consideration.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//val is returned from the findDirHor() function&lt;br /&gt;
void columnIndex (int val) {&lt;br /&gt;
  if (j == 0 &amp;amp;&amp;amp; val == -1) { j = 2;&lt;br /&gt;
  } else if (j == 2 &amp;amp;&amp;amp; val == 1) {  j = 0;&lt;br /&gt;
  } else { j = j + val;&lt;br /&gt;
  }}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113767</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113767"/>
		<updated>2020-03-05T17:40:55Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Commanding */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
The logic used to convert the tweets into commands is illustrated below. The existence or lack of each word in the tweet was checked in order to return a index-changing value.&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
As an example for the columns:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int findDirHor (String check) {&lt;br /&gt;
  if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos &amp;amp;&amp;amp; check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left and right&amp;quot;);&lt;br /&gt;
    return 0;]&lt;br /&gt;
  } if (check.indexOf(&amp;quot;right&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;right&amp;quot;);&lt;br /&gt;
    return 1;&lt;br /&gt;
  } else if (check.indexOf(&amp;quot;left&amp;quot;) != std::string::npos) {&lt;br /&gt;
    Serial.println(&amp;quot;left&amp;quot;);&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(&amp;quot;nor left nor right&amp;quot;);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113766</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113766"/>
		<updated>2020-03-05T17:35:21Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str;&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113765</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113765"/>
		<updated>2020-03-05T17:10:16Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;code&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:LEDcommand_flowchart.png&amp;diff=113764</id>
		<title>File:LEDcommand flowchart.png</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=File:LEDcommand_flowchart.png&amp;diff=113764"/>
		<updated>2020-03-05T17:09:42Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
== Copyright status: ==&lt;br /&gt;
&lt;br /&gt;
== Source: ==&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113763</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113763"/>
		<updated>2020-03-05T17:09:26Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Twitter-Controlled LED Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;code&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Commanding===&lt;br /&gt;
&lt;br /&gt;
[[File:LEDcommand_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
=Development=&lt;br /&gt;
==Initial studies==&lt;br /&gt;
&lt;br /&gt;
My plan is to work with Pyrocystis Fusiformis, also know as Bioluminescent Algae to develop some sort of interactive media. In order to be able to have concrete ideas on which kinds of projects can be developed, I first need to learn how to grow and take care of them.&lt;br /&gt;
&lt;br /&gt;
At first, I received a sample of algae from [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:I,_Organism,_and_Feedback_Loops/Antje_Danz Antje Danz]&#039;s stash. For that, we prepared a medium using the [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:DIY_Bio:_doing_things_with_biology/Frederic_Blais-Belanger/How_to_take_care recipe] provided by Frederic Blais-Belanger. At first, the algae were glowing very faintly in the dark, probably because they were not being given the proper care, so I also took on a caring method similar to Frederic&#039;s in order to grow them properly.&lt;br /&gt;
&lt;br /&gt;
First, I put the medium with the algae inside an empty bottle I had at home.&lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-bottle.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
Then, I built a simple system with a small cardboard box and a lightbulb that can be switched on and off. &lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-box1.jpg|200px]] [[File:Dyno-box2.jpg|200px]] [[File:Dyno-box3.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
They have been subject to a cycle of 12h light - 12h darkness. I still did not have the knowledge necessary to build a timer, so the activation and deactivation of the switch had to be done by hand, meaning that the cycle has had a few irregularities.&lt;br /&gt;
&lt;br /&gt;
==Concept development==&lt;br /&gt;
&lt;br /&gt;
My main interests when working with the dinoflagellates are memories from a trip I made once to a beach in Brazil. There, I was able to experience them while rubbing my feet on the wet sand. This inspired me to create a symbiotic space for humans and dinoflagellates, bringing forth the experience of the night coast as their original meeting environment. For this, I intend to work with three main elements: the sky, the sand and the sea. &lt;br /&gt;
&lt;br /&gt;
The sky is the setting, it can be seen all around as a continuous dark surface that can&#039;t be interacted with. The sand is the entrance, but also the humans&#039; natural space, where they can feel comfortable and safe. The sea is the destination, and the organisms&#039; natural space. In between the sand and the sea, there is the wet sand, the ideal spot where humans and dinoflagellates can meet.&lt;br /&gt;
&lt;br /&gt;
An important reference is the installation &#039;&#039;Tropicália&#039;&#039; by Brazilian artist Hélio Oiticica, realized in 1967 at the [https://en.wikipedia.org/wiki/Museum_of_Modern_Art,_Rio_de_Janeiro Museum of Modern Art, Rio de Janeiro]. His work attempts to create a tropical, iconically Brazilian environment in which the people can be reminded of the experience of walking through the hills and favelas of Rio de Janeiro.&lt;br /&gt;
{{#ev:youtube|coJr0MVp-NI|480|center}}&lt;br /&gt;
&lt;br /&gt;
==Summaery Proposal==&lt;br /&gt;
&lt;br /&gt;
*Complete: [[/Summaery 2019]]&lt;br /&gt;
&lt;br /&gt;
The idea is to create a hidden environment that can be discovered by interacting with bioluminescent Algae. The project’s main object is a transparent tank filled with the algae in the appropriate medium, as part of a miniature artificial environment. The box will be placed inside a dark chamber so that when a person pours the appropriate medium on the box through a dripping mechanism, the algae will glow and reveal the inner environment. &lt;br /&gt;
&lt;br /&gt;
[[File:Grid-box-set.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
The idea of dripping water on the tank comes mainly from the idea of rain as a natural phenomena that could familiar to both humans and algae.  When the visitor pours medium on top of the population, they are also nourishing them with new nutrients, renewing their environment. It is also an attempt to interact with the algae in a more respectful and gentle way, unlike many installations that attempt to make them glow through unusual means, such as sound vibration. With this sort of interaction, the viewers can experience their beauty without disturbing them too much, and in a way in which they can glow for longer.&lt;br /&gt;
&lt;br /&gt;
==Execution==&lt;br /&gt;
&lt;br /&gt;
Some attempts to make a dripping mechanism on top of the aquarium were made. These prototypes featured a lid with small holes to make the water drip, instead of pouring. The idea here was to simulate rain, as the water would drip through many holes randomly, and slowly. The schematics below illustrate how people are supposed to interact with the tank. Inside the tank, there is an algae population; beside it, a bottle filled with the appropiate medium, without algae.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme1.png|400px]] &lt;br /&gt;
&lt;br /&gt;
When testing it with a real model, instead of dripping through the many holes, though, the water would drip through only a few holes, in a fast pace. Another problem is that the mechanism on top would distract the view of the environment itself, as the surface was not visible from above. &lt;br /&gt;
&lt;br /&gt;
[[File:phys-test1.jpg|300px]] [[File:phys-test2.jpg|300px]] &lt;br /&gt;
&lt;br /&gt;
Because of that, the whole project was simpliflied. The lid was replace by the usage of lab pipettes, used for dripping liquids onto containers in a controlled manner, as seen in the schematics below. This way, the viewers will have more restricted amounts of liquid to drip, but also more liberty to choose where in the tank they would like to do it.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme2.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
TROPICÁLIA . In: ENCICLOPÉDIA Itaú Cultural de Arte e Cultura Brasileiras. São Paulo: Itaú Cultural, 2019. Available in: &amp;lt;http://enciclopedia.itaucultural.org.br/termo3741/tropicalia&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113762</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113762"/>
		<updated>2020-03-05T16:56:17Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
===Twitter search===&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;code&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LED matrix===&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Development=&lt;br /&gt;
==Initial studies==&lt;br /&gt;
&lt;br /&gt;
My plan is to work with Pyrocystis Fusiformis, also know as Bioluminescent Algae to develop some sort of interactive media. In order to be able to have concrete ideas on which kinds of projects can be developed, I first need to learn how to grow and take care of them.&lt;br /&gt;
&lt;br /&gt;
At first, I received a sample of algae from [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:I,_Organism,_and_Feedback_Loops/Antje_Danz Antje Danz]&#039;s stash. For that, we prepared a medium using the [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:DIY_Bio:_doing_things_with_biology/Frederic_Blais-Belanger/How_to_take_care recipe] provided by Frederic Blais-Belanger. At first, the algae were glowing very faintly in the dark, probably because they were not being given the proper care, so I also took on a caring method similar to Frederic&#039;s in order to grow them properly.&lt;br /&gt;
&lt;br /&gt;
First, I put the medium with the algae inside an empty bottle I had at home.&lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-bottle.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
Then, I built a simple system with a small cardboard box and a lightbulb that can be switched on and off. &lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-box1.jpg|200px]] [[File:Dyno-box2.jpg|200px]] [[File:Dyno-box3.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
They have been subject to a cycle of 12h light - 12h darkness. I still did not have the knowledge necessary to build a timer, so the activation and deactivation of the switch had to be done by hand, meaning that the cycle has had a few irregularities.&lt;br /&gt;
&lt;br /&gt;
==Concept development==&lt;br /&gt;
&lt;br /&gt;
My main interests when working with the dinoflagellates are memories from a trip I made once to a beach in Brazil. There, I was able to experience them while rubbing my feet on the wet sand. This inspired me to create a symbiotic space for humans and dinoflagellates, bringing forth the experience of the night coast as their original meeting environment. For this, I intend to work with three main elements: the sky, the sand and the sea. &lt;br /&gt;
&lt;br /&gt;
The sky is the setting, it can be seen all around as a continuous dark surface that can&#039;t be interacted with. The sand is the entrance, but also the humans&#039; natural space, where they can feel comfortable and safe. The sea is the destination, and the organisms&#039; natural space. In between the sand and the sea, there is the wet sand, the ideal spot where humans and dinoflagellates can meet.&lt;br /&gt;
&lt;br /&gt;
An important reference is the installation &#039;&#039;Tropicália&#039;&#039; by Brazilian artist Hélio Oiticica, realized in 1967 at the [https://en.wikipedia.org/wiki/Museum_of_Modern_Art,_Rio_de_Janeiro Museum of Modern Art, Rio de Janeiro]. His work attempts to create a tropical, iconically Brazilian environment in which the people can be reminded of the experience of walking through the hills and favelas of Rio de Janeiro.&lt;br /&gt;
{{#ev:youtube|coJr0MVp-NI|480|center}}&lt;br /&gt;
&lt;br /&gt;
==Summaery Proposal==&lt;br /&gt;
&lt;br /&gt;
*Complete: [[/Summaery 2019]]&lt;br /&gt;
&lt;br /&gt;
The idea is to create a hidden environment that can be discovered by interacting with bioluminescent Algae. The project’s main object is a transparent tank filled with the algae in the appropriate medium, as part of a miniature artificial environment. The box will be placed inside a dark chamber so that when a person pours the appropriate medium on the box through a dripping mechanism, the algae will glow and reveal the inner environment. &lt;br /&gt;
&lt;br /&gt;
[[File:Grid-box-set.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
The idea of dripping water on the tank comes mainly from the idea of rain as a natural phenomena that could familiar to both humans and algae.  When the visitor pours medium on top of the population, they are also nourishing them with new nutrients, renewing their environment. It is also an attempt to interact with the algae in a more respectful and gentle way, unlike many installations that attempt to make them glow through unusual means, such as sound vibration. With this sort of interaction, the viewers can experience their beauty without disturbing them too much, and in a way in which they can glow for longer.&lt;br /&gt;
&lt;br /&gt;
==Execution==&lt;br /&gt;
&lt;br /&gt;
Some attempts to make a dripping mechanism on top of the aquarium were made. These prototypes featured a lid with small holes to make the water drip, instead of pouring. The idea here was to simulate rain, as the water would drip through many holes randomly, and slowly. The schematics below illustrate how people are supposed to interact with the tank. Inside the tank, there is an algae population; beside it, a bottle filled with the appropiate medium, without algae.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme1.png|400px]] &lt;br /&gt;
&lt;br /&gt;
When testing it with a real model, instead of dripping through the many holes, though, the water would drip through only a few holes, in a fast pace. Another problem is that the mechanism on top would distract the view of the environment itself, as the surface was not visible from above. &lt;br /&gt;
&lt;br /&gt;
[[File:phys-test1.jpg|300px]] [[File:phys-test2.jpg|300px]] &lt;br /&gt;
&lt;br /&gt;
Because of that, the whole project was simpliflied. The lid was replace by the usage of lab pipettes, used for dripping liquids onto containers in a controlled manner, as seen in the schematics below. This way, the viewers will have more restricted amounts of liquid to drip, but also more liberty to choose where in the tank they would like to do it.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme2.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
TROPICÁLIA . In: ENCICLOPÉDIA Itaú Cultural de Arte e Cultura Brasileiras. São Paulo: Itaú Cultural, 2019. Available in: &amp;lt;http://enciclopedia.itaucultural.org.br/termo3741/tropicalia&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113761</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113761"/>
		<updated>2020-03-05T16:55:36Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;code&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
const int rows = 3;&lt;br /&gt;
&lt;br /&gt;
const int columns = 3;&lt;br /&gt;
&lt;br /&gt;
uint8_t pinVal[rows][columns] = { { D0, D1, D2 }, { D3, D4, D5 }, { D6, D7, D8 } };&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In order to light them up:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;digitalWrite(pinVal[a][b], HIGH);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Development=&lt;br /&gt;
==Initial studies==&lt;br /&gt;
&lt;br /&gt;
My plan is to work with Pyrocystis Fusiformis, also know as Bioluminescent Algae to develop some sort of interactive media. In order to be able to have concrete ideas on which kinds of projects can be developed, I first need to learn how to grow and take care of them.&lt;br /&gt;
&lt;br /&gt;
At first, I received a sample of algae from [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:I,_Organism,_and_Feedback_Loops/Antje_Danz Antje Danz]&#039;s stash. For that, we prepared a medium using the [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:DIY_Bio:_doing_things_with_biology/Frederic_Blais-Belanger/How_to_take_care recipe] provided by Frederic Blais-Belanger. At first, the algae were glowing very faintly in the dark, probably because they were not being given the proper care, so I also took on a caring method similar to Frederic&#039;s in order to grow them properly.&lt;br /&gt;
&lt;br /&gt;
First, I put the medium with the algae inside an empty bottle I had at home.&lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-bottle.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
Then, I built a simple system with a small cardboard box and a lightbulb that can be switched on and off. &lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-box1.jpg|200px]] [[File:Dyno-box2.jpg|200px]] [[File:Dyno-box3.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
They have been subject to a cycle of 12h light - 12h darkness. I still did not have the knowledge necessary to build a timer, so the activation and deactivation of the switch had to be done by hand, meaning that the cycle has had a few irregularities.&lt;br /&gt;
&lt;br /&gt;
==Concept development==&lt;br /&gt;
&lt;br /&gt;
My main interests when working with the dinoflagellates are memories from a trip I made once to a beach in Brazil. There, I was able to experience them while rubbing my feet on the wet sand. This inspired me to create a symbiotic space for humans and dinoflagellates, bringing forth the experience of the night coast as their original meeting environment. For this, I intend to work with three main elements: the sky, the sand and the sea. &lt;br /&gt;
&lt;br /&gt;
The sky is the setting, it can be seen all around as a continuous dark surface that can&#039;t be interacted with. The sand is the entrance, but also the humans&#039; natural space, where they can feel comfortable and safe. The sea is the destination, and the organisms&#039; natural space. In between the sand and the sea, there is the wet sand, the ideal spot where humans and dinoflagellates can meet.&lt;br /&gt;
&lt;br /&gt;
An important reference is the installation &#039;&#039;Tropicália&#039;&#039; by Brazilian artist Hélio Oiticica, realized in 1967 at the [https://en.wikipedia.org/wiki/Museum_of_Modern_Art,_Rio_de_Janeiro Museum of Modern Art, Rio de Janeiro]. His work attempts to create a tropical, iconically Brazilian environment in which the people can be reminded of the experience of walking through the hills and favelas of Rio de Janeiro.&lt;br /&gt;
{{#ev:youtube|coJr0MVp-NI|480|center}}&lt;br /&gt;
&lt;br /&gt;
==Summaery Proposal==&lt;br /&gt;
&lt;br /&gt;
*Complete: [[/Summaery 2019]]&lt;br /&gt;
&lt;br /&gt;
The idea is to create a hidden environment that can be discovered by interacting with bioluminescent Algae. The project’s main object is a transparent tank filled with the algae in the appropriate medium, as part of a miniature artificial environment. The box will be placed inside a dark chamber so that when a person pours the appropriate medium on the box through a dripping mechanism, the algae will glow and reveal the inner environment. &lt;br /&gt;
&lt;br /&gt;
[[File:Grid-box-set.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
The idea of dripping water on the tank comes mainly from the idea of rain as a natural phenomena that could familiar to both humans and algae.  When the visitor pours medium on top of the population, they are also nourishing them with new nutrients, renewing their environment. It is also an attempt to interact with the algae in a more respectful and gentle way, unlike many installations that attempt to make them glow through unusual means, such as sound vibration. With this sort of interaction, the viewers can experience their beauty without disturbing them too much, and in a way in which they can glow for longer.&lt;br /&gt;
&lt;br /&gt;
==Execution==&lt;br /&gt;
&lt;br /&gt;
Some attempts to make a dripping mechanism on top of the aquarium were made. These prototypes featured a lid with small holes to make the water drip, instead of pouring. The idea here was to simulate rain, as the water would drip through many holes randomly, and slowly. The schematics below illustrate how people are supposed to interact with the tank. Inside the tank, there is an algae population; beside it, a bottle filled with the appropiate medium, without algae.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme1.png|400px]] &lt;br /&gt;
&lt;br /&gt;
When testing it with a real model, instead of dripping through the many holes, though, the water would drip through only a few holes, in a fast pace. Another problem is that the mechanism on top would distract the view of the environment itself, as the surface was not visible from above. &lt;br /&gt;
&lt;br /&gt;
[[File:phys-test1.jpg|300px]] [[File:phys-test2.jpg|300px]] &lt;br /&gt;
&lt;br /&gt;
Because of that, the whole project was simpliflied. The lid was replace by the usage of lab pipettes, used for dripping liquids onto containers in a controlled manner, as seen in the schematics below. This way, the viewers will have more restricted amounts of liquid to drip, but also more liberty to choose where in the tank they would like to do it.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme2.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
TROPICÁLIA . In: ENCICLOPÉDIA Itaú Cultural de Arte e Cultura Brasileiras. São Paulo: Itaú Cultural, 2019. Available in: &amp;lt;http://enciclopedia.itaucultural.org.br/termo3741/tropicalia&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113760</id>
		<title>IFD:Designing Networked Objects/César Felipe Daher</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=IFD:Designing_Networked_Objects/C%C3%A9sar_Felipe_Daher&amp;diff=113760"/>
		<updated>2020-03-05T16:53:26Z</updated>

		<summary type="html">&lt;p&gt;Cesardaher: /* Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Twitter-Controlled LED Matrix=&lt;br /&gt;
&lt;br /&gt;
==The concept==&lt;br /&gt;
&lt;br /&gt;
This project was created as an attempt to use Twitter [https://en.wikipedia.org/wiki/Application_programming_interface API] to send commands to a microcontroller. Its basic structure consists of a matrix of LEDs in which only one of them is lit up at a time. The Twitter API is used to collect information from tweets in order to choose which LED to light up.&lt;br /&gt;
&lt;br /&gt;
At first, the idea was to collect and analyze information from tweets all around the world, so as to generate inputs. However, as this was my first time working with both microcontrollers and APIs, it was preferred to lower the complexity of this interaction to the level of generating inputs from individual tweets using the search feature.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
The following materials and services were used in order to develop this project:&lt;br /&gt;
&lt;br /&gt;
* ESP8266 NodeMCU microcontroller;&lt;br /&gt;
* Elegoo UNO R3 Super Starter Kit (or similar, such as Arduino Uno);&lt;br /&gt;
** 9 LEDs;&lt;br /&gt;
** 9 resistors (220 Ohms);&lt;br /&gt;
** Jumper wires;&lt;br /&gt;
** Breadboard;&lt;br /&gt;
* Arduino software;&lt;br /&gt;
* [https://github.com/debsahu/TwitterWebAPI Twitter API Library] for Arduino;&lt;br /&gt;
* Twitter developer account;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The core of this project is the use of ESP8266 in order to connect to the internet and access the Twitter API. It is worth mentioning, though, that I was required to apply for a developer Twitter account in order to access the API.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
In order to develop this project, most of my research was focused on tweet-to-microcontroller interactions on platforms such as Pinterest, Instructables and Hackaday. The two examples below are, respectively, [https://www.instructables.com/id/Mood-Lamp-Based-on-Twitter-Hashtags/ Mood Lamp Based on Twitter Hashtags] and [https://www.instructables.com/id/Twitter-Controlled-Pet-Feeder/ Twitter-Controlled Pet Feeder].&lt;br /&gt;
The former searches for the use of hashtags such as #angry in order to determine the color of the lamp, while the latter receives from a specific user tweets as direct commands to the pet feeder. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:TCLM_reference_1.jpg&lt;br /&gt;
File:TCLM_reference_2.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another conceptual reference are the [https://www.twitch.tv/twitchplayspokemon Twitch Plays Pokémon] streams. In these game streams, a Pokémon game is run, being controlled entirely by commands given by the viewers on the chat. For example, if a person were to say &amp;quot;A+B&amp;quot; in the chat, this would be taken as an in-game command to press the A and B buttons at the same time. Though not a particularly optimal way to play the game, it is an interesting approach as how to create a cooperative multiplayer experience within a single-player game.&lt;br /&gt;
&lt;br /&gt;
[[File:TCLM_reference_3.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
The first attempts were to connect the ESP8266 to the internet and use it to access the Twitter API to retrieve tweets without issuing any additional commands. The Twitter API library for Arduino comes with three basic functions:&lt;br /&gt;
&lt;br /&gt;
*Search for a keyword&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
String tmsg = tcr.searchTwitter(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Retrieve user information&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str;&lt;br /&gt;
&lt;br /&gt;
tcr.searchUser(search_str);&amp;lt;/code&amp;gt;&lt;br /&gt;
*Post to Twitter&lt;br /&gt;
&amp;lt;code&amp;gt;std::string twitter_post_msg;&lt;br /&gt;
&lt;br /&gt;
tcr.tweet(twitter_post_msg);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first one was in the core of the project, while the second and third were only used for some early testing. In order to use the search feature, it is required to define a search string, which can be formatted to include complex parameters (explained in the [https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets Developer Twitter Documentation]). This function, however, does not support tweet collection or analysis.&lt;br /&gt;
&lt;br /&gt;
Once I understood how to properly use this library and had successful attempts, I moved on to develop a more complex mechanism. Inspired by the previously mentioned Twitch Plays Pokémon, I devised a device which would collect tweets with any one of the directional words &amp;quot;up&amp;quot;, &amp;quot;down&amp;quot;, &amp;quot;left&amp;quot; and &amp;quot;right&amp;quot; (excluding retweets, in order to prevent duplicates) and use them as commands for the microcontroller. The interesting thing about these words is that they are extensively used in the English language with other conotations, which makes the search especially random. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;std::string search_str = &amp;quot;up OR down OR left OR right -RT&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands were devised to navigate a 3x3 LED matrix in which the LEDs were stored in the code as a 2D array. That way, they were able to be lit up by calling their indexes.&lt;br /&gt;
&lt;br /&gt;
[[File:LED_array.png|200px]]&lt;br /&gt;
&lt;br /&gt;
=Development=&lt;br /&gt;
==Initial studies==&lt;br /&gt;
&lt;br /&gt;
My plan is to work with Pyrocystis Fusiformis, also know as Bioluminescent Algae to develop some sort of interactive media. In order to be able to have concrete ideas on which kinds of projects can be developed, I first need to learn how to grow and take care of them.&lt;br /&gt;
&lt;br /&gt;
At first, I received a sample of algae from [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:I,_Organism,_and_Feedback_Loops/Antje_Danz Antje Danz]&#039;s stash. For that, we prepared a medium using the [https://www.uni-weimar.de/kunst-und-gestaltung/wiki/GMU:DIY_Bio:_doing_things_with_biology/Frederic_Blais-Belanger/How_to_take_care recipe] provided by Frederic Blais-Belanger. At first, the algae were glowing very faintly in the dark, probably because they were not being given the proper care, so I also took on a caring method similar to Frederic&#039;s in order to grow them properly.&lt;br /&gt;
&lt;br /&gt;
First, I put the medium with the algae inside an empty bottle I had at home.&lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-bottle.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
Then, I built a simple system with a small cardboard box and a lightbulb that can be switched on and off. &lt;br /&gt;
&lt;br /&gt;
[[File:Dyno-box1.jpg|200px]] [[File:Dyno-box2.jpg|200px]] [[File:Dyno-box3.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
They have been subject to a cycle of 12h light - 12h darkness. I still did not have the knowledge necessary to build a timer, so the activation and deactivation of the switch had to be done by hand, meaning that the cycle has had a few irregularities.&lt;br /&gt;
&lt;br /&gt;
==Concept development==&lt;br /&gt;
&lt;br /&gt;
My main interests when working with the dinoflagellates are memories from a trip I made once to a beach in Brazil. There, I was able to experience them while rubbing my feet on the wet sand. This inspired me to create a symbiotic space for humans and dinoflagellates, bringing forth the experience of the night coast as their original meeting environment. For this, I intend to work with three main elements: the sky, the sand and the sea. &lt;br /&gt;
&lt;br /&gt;
The sky is the setting, it can be seen all around as a continuous dark surface that can&#039;t be interacted with. The sand is the entrance, but also the humans&#039; natural space, where they can feel comfortable and safe. The sea is the destination, and the organisms&#039; natural space. In between the sand and the sea, there is the wet sand, the ideal spot where humans and dinoflagellates can meet.&lt;br /&gt;
&lt;br /&gt;
An important reference is the installation &#039;&#039;Tropicália&#039;&#039; by Brazilian artist Hélio Oiticica, realized in 1967 at the [https://en.wikipedia.org/wiki/Museum_of_Modern_Art,_Rio_de_Janeiro Museum of Modern Art, Rio de Janeiro]. His work attempts to create a tropical, iconically Brazilian environment in which the people can be reminded of the experience of walking through the hills and favelas of Rio de Janeiro.&lt;br /&gt;
{{#ev:youtube|coJr0MVp-NI|480|center}}&lt;br /&gt;
&lt;br /&gt;
==Summaery Proposal==&lt;br /&gt;
&lt;br /&gt;
*Complete: [[/Summaery 2019]]&lt;br /&gt;
&lt;br /&gt;
The idea is to create a hidden environment that can be discovered by interacting with bioluminescent Algae. The project’s main object is a transparent tank filled with the algae in the appropriate medium, as part of a miniature artificial environment. The box will be placed inside a dark chamber so that when a person pours the appropriate medium on the box through a dripping mechanism, the algae will glow and reveal the inner environment. &lt;br /&gt;
&lt;br /&gt;
[[File:Grid-box-set.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
The idea of dripping water on the tank comes mainly from the idea of rain as a natural phenomena that could familiar to both humans and algae.  When the visitor pours medium on top of the population, they are also nourishing them with new nutrients, renewing their environment. It is also an attempt to interact with the algae in a more respectful and gentle way, unlike many installations that attempt to make them glow through unusual means, such as sound vibration. With this sort of interaction, the viewers can experience their beauty without disturbing them too much, and in a way in which they can glow for longer.&lt;br /&gt;
&lt;br /&gt;
==Execution==&lt;br /&gt;
&lt;br /&gt;
Some attempts to make a dripping mechanism on top of the aquarium were made. These prototypes featured a lid with small holes to make the water drip, instead of pouring. The idea here was to simulate rain, as the water would drip through many holes randomly, and slowly. The schematics below illustrate how people are supposed to interact with the tank. Inside the tank, there is an algae population; beside it, a bottle filled with the appropiate medium, without algae.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme1.png|400px]] &lt;br /&gt;
&lt;br /&gt;
When testing it with a real model, instead of dripping through the many holes, though, the water would drip through only a few holes, in a fast pace. Another problem is that the mechanism on top would distract the view of the environment itself, as the surface was not visible from above. &lt;br /&gt;
&lt;br /&gt;
[[File:phys-test1.jpg|300px]] [[File:phys-test2.jpg|300px]] &lt;br /&gt;
&lt;br /&gt;
Because of that, the whole project was simpliflied. The lid was replace by the usage of lab pipettes, used for dripping liquids onto containers in a controlled manner, as seen in the schematics below. This way, the viewers will have more restricted amounts of liquid to drip, but also more liberty to choose where in the tank they would like to do it.&lt;br /&gt;
&lt;br /&gt;
[[File:algae-scheme2.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
TROPICÁLIA . In: ENCICLOPÉDIA Itaú Cultural de Arte e Cultura Brasileiras. São Paulo: Itaú Cultural, 2019. Available in: &amp;lt;http://enciclopedia.itaucultural.org.br/termo3741/tropicalia&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Cesardaher</name></author>
	</entry>
</feed>