@berrycreamypins is turning your favorite Helmet Shark into a pin, everybody!! @astrodeath, are you ready? . From @berrycreamypins - New pin in collaboration with @erwin.papa coming soon #erwinpapa #shark #sharkpins #mecha #mechpins #robot #aqua #ocean #mechashark #pin #pins #pinning #pinstagram #darkpins #glitterpins #uvpins #glowpins #animepins #artistpins #art #darkarts https://www.instagram.com/p/BrWAxw-nQtw/?utm_source=ig_tumblr_share&igshid=1jqkvd1u3cgel
295 notes
·
View notes
Final Code
Final code for the setup added slight fading out to smooth the color changes
int REDPin = 3;
int GREENPin = 5;
int BLUEPin = 6;
int readValue1;
int readValue2;
int readValue3;
int writeValue1;
int writeValue2;
int writeValue3;
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(REDPin, OUTPUT);
pinMode(GREENPin, OUTPUT);
pinMode(BLUEPin, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int readValue = analogRead(A0);
readValue1 = analogRead(A0); //Read the voltage on the Potentiometer
if (readValue1 < 520)
{
writeValue1 = ((1023 - readValue1) - 516.) / (535. - 516.) * (255. - 0.) + 0.;
}
else
{
writeValue1 = ((readValue1 - 520) / (535 - 520)) * (255. - 0.) + 0.;
}
int readValue2 = analogRead(A1);
readValue2 = analogRead(A1); //Read the voltage on the Potentiometer
if (readValue2 < 520)
{
writeValue2 = ((1023 - readValue2) - (1023. - 520.)) / (535. - (1023. - 520.)) * (255. - 0.) + 0.;
}
else
{
writeValue2 = ( (readValue2 - 520.) / (535 - 520.) ) * (255. - 0.) + 0.;
}
int readValue3 = analogRead(A2);
readValue3 = analogRead(A2); //Read the voltage on the Potentiometer
if (readValue3 < 554)
{
writeValue3 = ((1023 - readValue3) - (1023. - 554.)) / (570. - (1023. - 554.)) * (255. - 0.) + 0.;
}
else
{
writeValue3 = ( (readValue3 - 554.) / (570. - 554.) ) * (255. - 0.) + 0.;
}
// fade in from min to max in increments of 5 points:
for (int fadeValue = 0 ; fadeValue <= writeValue1; fadeValue += 30) {
// sets the value (range from 0 to 255):
analogWrite(REDPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(1);
}
// fade out from max to min in increments of 5 points:
for (int fadeValue = writeValue1 ; fadeValue >= 0; fadeValue -= 30) {
// sets the value (range from 0 to 255):
analogWrite(REDPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(1);
analogWrite(GREENPin, writeValue2);
analogWrite(BLUEPin, writeValue3);
analogWrite(UVPin, writeValue3);
Serial.print("Write Value R ");
Serial.println(writeValue1);
Serial.print("Read Value R ");
Serial.println(readValue1);
Serial.print("Write Value G ");
Serial.println(writeValue2);
Serial.print("Read Value G ");
Serial.println(readValue2);
Serial.print("Write Value B ");
Serial.println(writeValue3);
Serial.print("Read Value B ");
Serial.println(readValue3);
}
}
0 notes
The date is set! FRIDAY!! Which colorways are you getting? Available at @berrycreamypins Design by Erwin Papa Vector work by @abstrakt_deacon Produced by @berrycreamypins #helmetshark #megalodame #shark #sharkpins #mecha #mechpins #robot #aqua #ocean #mechashark #pin #pins #pinning #pinstagram #darkpins #glitterpins #uvpins #glowpins #animepins #artistpins #art #darkarts (at Lakewood, California) https://www.instagram.com/p/BzJle5dnVXY/?igshid=oenf6a2cn2oy
4 notes
·
View notes
riggingdojo
RT @wtelford: @Saihtamen Rivet(uvPin) supports edge and face selection. ProximityPin doesn’t require uv’s. ID based component selection is topology dependent therefore isn’t procedural. With python/c++ chops you can create a node that outputs the worldMatrix of components given an ID using Maya’s api’s
0 notes
Code for Creative Audio
This version was designed to be self calibrating but for some reason it wouldnt do the equations properly
const int REDPin = 4; // RED pin of the LED to PWM pin 4
const int GREENPin = 5; // GREEN pin of the LED to PWM pin 5
const int BLUEPin = 6; // BLUE pin of the LED to PWM pin
int readValue1;
int readValue2;
int readValue3;
int writeValue1;
int writeValue2;
int writeValue3;
int sensorValue1 = 0; // the sensor value
int sensor1Min = 1023; // minimum sensor value
int sensor1Max = 0;
int sensorValue2 = 0; // the sensor value
int sensor2Min = 1023; // minimum sensor value
int sensor2Max = 0;
int sensorValue3 = 0; // the sensor value
int sensor3Min = 1023; // minimum sensor value
int sensor3Max = 0;
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
while (millis() < 5000) {
sensorValue1 = analogRead(A0);
// record the maximum sensor value
if (sensorValue1 > sensor1Max) {
sensor1Max = sensorValue1;
}
// record the minimum sensor value
if (sensorValue1 < sensor1Min) {
sensor1Min = sensorValue1;
sensorValue2 = analogRead(A2);
// record the maximum sensor value
if (sensorValue2 > sensor2Max) {
sensor2Max = sensorValue2;
}
// record the minimum sensor value
if (sensorValue2 < sensor2Min) {
sensor2Min = sensorValue2;
}
sensorValue3 = analogRead(A3);
// record the maximum sensor value
if (sensorValue3 > sensor3Max) {
sensor3Max = sensorValue3;
}
// record the minimum sensor value
if (sensorValue3 < sensor3Min) {
sensor3Min = sensorValue3;
}
}
pinMode(REDPin, OUTPUT);
pinMode(GREENPin, OUTPUT);
pinMode(BLUEPin, OUTPUT);
pinMode(UVPin, OUTPUT);
}
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int readValue = analogRead(A0);
readValue1 = analogRead(A0); //Read the voltage on the Potentiometer
delay(1);
if (readValue1 < sensor1Min)
{
writeValue1 = ((1023. - readValue1) - (1023. - sensor1Min)) / (575. - (1023. - sensor1Min)) * (255. - 0.) + 0.;
}
else
{
writeValue1 = ( (readValue1 - sensor1Min) / (545. - sensor1Min) ) * (255. - 0.) + 0.;
}
int readValue2 = analogRead(A1);
readValue2 = analogRead(A1); //Read the voltage on the Potentiometer
writeValue2 = map(readValue2, 450, 550, 0, 255);
int readValue3 = analogRead(A2);
if (readValue3 < sensor3Max)
{
writeValue3 = ((1023 - readValue3) - (1023-sensor3Max)) / (550 - (1023-sensor3Max)) * (255. - 0.) + 0.;
}
else
{
writeValue3 = ( (readValue3 - sensor3Max) / (540 - sensor3Max) ) * (255. - 0.) + 0.;
}
analogWrite(REDPin, writeValue1);
analogWrite(GREENPin, writeValue2);
analogWrite(BLUEPin, writeValue3);
}
0 notes