AWS gaming experiment

I got inspired by this blog post by Larry Gadea and decided to ask about it on twitter:

So that’s what I decided to do. Here’s a story of my experiments and findings:

The traffic from Finland to Amazon AWS regions in EU seems to change a bit depending on traffic. The following snippet is from 25.4.2015 but earlier when I tested I got almost double the latency.

Cloudping to AWS

Let’s try anyway.

I decided to go with regular instance instead of spot instance due to faster start-up and simpler pricing model. First problem I encountered was that I just created a new account and Amazon needs to verify the account before I can create instances.

For testing I created a new GPU instance in Ireland and configured VPN, Steam etc. roughly following Larry’s instructions.

I then tested to play some games over the connection. I tested with the following games:

  • Cities: Skylines
  • Death Rally
  • Portal

And here’s some stats from playing (or attempting to play) Cities: Skylines.

	"SlowNetworkPercent"		"83.889091491699219"
	"SlowDecodePercent"		"0.48104065656661987"
	"SlowDisplayPercent"		"30.016672134399414"
	"AvgClientBitrate"		"147.28001403808594"
	"StdDevClientBitrate"		"137.56430053710937"
	"AvgServerBitrate"		"2135.413330078125"
	"StdDevServerBitrate"		"8527.41015625"
	"AvgLinkBandwidth"		"7525.86865234375"
	"AvgPingMS"		"1354.215087890625"
	"StdDevPingMS"		"2320.548095703125"
	"AvgCaptureMS"		"2.3584384918212891"
	"StdDevCaptureMS"		"1.7173653841018677"
	"AvgConvertMS"		"0.021369790658354759"
	"StdDevConvertMS"		"0.1436113715171814"
	"AvgEncodeMS"		"5.5488224029541016"
	"StdDevEncodeMS"		"1.5767149925231934"
	"AvgNetworkMS"		"191.907958984375"
	"StdDevNetworkMS"		"450.26995849609375"
	"AvgDecodeMS"		"2.8170154094696045"
	"StdDevDecodeMS"		"31.469053268432617"
	"AvgDisplayMS"		"38141.1484375"
	"StdDevDisplayMS"		"337954.03125"
	"AvgFrameMS"		"109.8192138671875"
	"StdDevFrameMS"		"118.69873809814453"
	"AvgFPS"		"55.433006286621094"
	"StdDevFPS"		"16.267507553100586"

I’m not sure how reliable the stats are, I noticed quite large differences in “AvgPingMS” value between different attempts and games. The range I saw was from about 200 ms to about 1400 ms.

In the end I decided that this was simply not going to work. The games were completely unplayable.

This was a fun experiment that cost me about 5USD in EC2 instance and storage costs.

Humidity sensor HIH-4000 series with LCD-screen and Arduino

Here’s source code and information about my humidity sensor project. The LCD screen is connected following this datasheet from arduino examples. I might add photos of my setup later.

And this is how I connected the humidity sensor:


Honeywell HIH-4000 datasheet

Arduino LCD Hello World example

Source code:

// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int sensorPin = 0;
int sensorValue = 0;  // variable to store the value coming from the sensor
float voltage = 0;
float RH = 0;
void setup() {
  // set up the LCD's number of rows and columns:
  lcd.begin(16, 1);
void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
  // (1 = 0.0049V) 0-1023 range
  voltage = sensorValue * 0.0049;
  // Relative humidity(RH) (These are the values for my sensor, yours may differ a bit):
  // 0% = about 163
  // 100% = about 795
  // With roughly linear response.
  // 795 - 163 = 632 (points in the sensor's range)
  // 6.32 points = 1% RH
  RH = (sensorValue - 163) / 6.32;
  if (RH < -5) {
    lcd.print("Check sensor!");
  } else {
    lcd.setCursor(0, 0);
    lcd.print(sensorValue); //Analog input value in range of 0-1023
    lcd.setCursor(5, 0);
    lcd.print(voltage); //Voltage calculated from the previous value, see comment above
    lcd.setCursor(10, 0);
    lcd.print(RH); //Relative humidity in percent

Update 17.04.2010: For those who want temperature correction and supply voltage correction (for use with for example DS2438), here’s how to calculate that:
Relative humidity = ((Voltage A/D)/(VCC) – 0.16) * 161.29 / 1.0546 – (0.00216 * (Temperature in C))