-
Ever wanted to play pong on your phone ? :D
04/08/2018 at 17:31 • 6 comments -
QuiteSomeLEDsAddon
04/02/2018 at 19:45 • 0 commentsToday I had the time to place "some" LEDs.. :D
-
New milled cover for the tinkering area of the DIY-shield
03/19/2018 at 18:40 • 0 comments -
Hallo World (DIY extension)
02/19/2018 at 18:53 • 0 comments/* Name: Hallo_World_DIY_Extension_FP2.ino Created: 07.01.2018 13:13:43 Author: Kirschner Christoph */ #include <Adafruit_NeoPixel.h> int LEDs[8]{ 8,9,10,11,12,13,14,15 }; // Pin connected to the Neopixel #define PIN 17 // How many NeoPixels are attached #define NUMPIXELS 1 // Definition of the Neopixel Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); void setup() { // Setting the pinmode of the GPIOs for the LEDs for (int i = 0; i < 8; i++) { pinMode(LEDs[i], OUTPUT); } // Starting the Neopixel pixels.begin(); pinMode(17, OUTPUT); } void loop() { // LEDs are blinking in a row for (int i = 0; i < 8; i++) { digitalWrite(LEDs[i], HIGH); if (i > 0) { digitalWrite(LEDs[i - 1], LOW); } delay(50); } for (int i = 8; i >= 0; i--) { digitalWrite(LEDs[i], HIGH); digitalWrite(LEDs[i + 1], LOW); delay(50); } for (int i = 0; i<256; i++) { // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255 pixels.setPixelColor(0, pixels.Color(0, i, 0)); // Moderately bright green color. pixels.show(); // This sends the updated pixel color to the hardware. delay(5); // Delay for a period of time (in milliseconds). } for (int i = 255; i>0; i--) { // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255 pixels.setPixelColor(0, pixels.Color(0, i, 0)); // Moderately bright green color. pixels.show(); // This sends the updated pixel color to the hardware. delay(5); // Delay for a period of time (in milliseconds). } pixels.setPixelColor(0, pixels.Color(0, 0, 0)); // Neopixel: off pixels.show(); // This sends the updated pixel color to the hardware. }
-
DIY extension -> "Hello World"
01/07/2018 at 12:02 • 0 comments -
Programming adapter
01/01/2018 at 21:23 • 0 commentsThis makes programming a lot easier!! :)
-
Last PCB ~ you better be fast
12/15/2017 at 15:01 • 0 commentsI sold all other pcbs of the cap. buttons and now one is still here :)
Any Fairphoners out there who want one :)
I also can solder everything up for you if you want that :)
Text me if there's interest !!! :)
Edit: sold !!
-
New PCB
12/10/2017 at 12:54 • 0 commentsI designed and ordered a new PCB for the Fairphone 2.
It`s much like those prototyping-shields you have for your Arduino. And the purpose is to start tinkering and building things in combination with the PF2. This can not only extand your possiblities you have with your phone but also gives you the full control of the additional hardware you want.
Feel free to ask whatever is on your mind :)
-
Code to get basic functions
12/03/2017 at 17:16 • 0 comments/* Name: Touch_Extension_FP2.ino Created: 03.12.2017 15:03:18 Author: Kirschner Christoph */ #include <HID.h> #include <HID-Settings.h> #include <HID-Project.h> #include <CapacitiveSensor.h> /* * CapitiveSense Library Demo Sketch * Paul Badger 2008 * Uses a high value resistor e.g. 10M between send pin and receive pin * Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values. * Receive pin is the sensor pin - try different amounts of foil/metal on this pin */ const int led1 = 6; const int led2 = 8; const int led3 = 9; bool buttonPressed1 = false; // volume up bool buttonPressed2 = false; // wake screen/ sleep screen bool buttonPressed3 = false; // volume down int firstPress1 = 0; // first press of button 1 aka volume up int firstPress2 = 0; // first press of button 2 aka wake screen/ sleep screen int firstPress3 = 0; // first press of button 3 aka volume down bool screenCase = true; CapacitiveSensor cs_13_A0 = CapacitiveSensor(13, A0); // 1.1M resistor between pins 13 & A0, pin A0 is sensor pin, add a wire and or foil if desired CapacitiveSensor cs_5_A1 = CapacitiveSensor(5, A1); // 1.1M resistor between pins 5 & A1, pin A1 is sensor pin, add a wire and or foil CapacitiveSensor cs_10_A2 = CapacitiveSensor(10, A2); // 1.1M resistor between pins 10 & A2, pin A2 is sensor pin, add a wire and or foil void setup() { Consumer.begin(); System.begin(); Keyboard.begin(); //Serial.begin(9600); pinMode(13, OUTPUT); pinMode(10, OUTPUT); pinMode(5, OUTPUT); pinMode(A0, INPUT); pinMode(A1, INPUT); pinMode(A2, INPUT); } void loop() { long start = millis(); long total1 = cs_13_A0.capacitiveSensor(30); // touch output in numbers long total2 = cs_5_A1.capacitiveSensor(30); long total3 = cs_10_A2.capacitiveSensor(30); if (total1 > 100) { digitalWrite(led1, HIGH); } // lighting up the right leds else { digitalWrite(led3, LOW); } if (total2 > 100) { digitalWrite(led2, HIGH); } else { digitalWrite(led2, LOW); } if (total3 > 100) { digitalWrite(led3, HIGH); } else { digitalWrite(led1, LOW); } /* Serial.print("Total1"); Serial.println(total1); Serial.print("Total2"); Serial.println(total2); Serial.print("Total3"); Serial.println(total3); */ int time = millis(); if (total3 > 100 && buttonPressed1 == false) { firstPress1 = millis(); buttonPressed1 = true; } if (total3 < 50 && buttonPressed1 == true) { if (time - firstPress1 > 50) { Consumer.write(MEDIA_VOL_UP); // HID code for volume up //Serial.println("vol up"); } buttonPressed1 = false; } time = millis(); if (total2 > 100 && buttonPressed2 == false) { firstPress2 = millis(); buttonPressed2 = true; } if (total2 < 50 && buttonPressed2 == true) { if (time - firstPress2 > 50) { if (screenCase == true) { System.write(SYSTEM_SLEEP); screenCase = false; } else if (screenCase == false) { Keyboard.write(CONSUMER_POWER); //HID code for waking phone/set phone to sleep screenCase = true; } //Serial.println("power on/off"); } buttonPressed2 = false; } time = millis(); if (total1 > 100 && buttonPressed3 == false) { firstPress3 = millis(); buttonPressed3 = true; } if (total1 < 50 && buttonPressed3 == true) { if (time - firstPress3 > 50) { Consumer.write(MEDIA_VOL_DOWN); // HID code for volume down //Serial.println("vol down"); } buttonPressed3 = false; } }
-
FP-Forum
11/27/2017 at 20:37 • 0 commentsThis is the forum-page in the FP-forum: https://forum.fairphone.com/t/making-an-extension-pcb-for-fp2/35430/18
I'm trying to blog frequently :)