Home Discord Chat
Go Back   ChiefsPlanet > Nzoner's Game Room
Register FAQDonate Members List Calendar

Reply
 
Thread Tools Display Modes
Old 10-14-2021, 10:50 AM   #1
Chazno Chazno is offline
Starter
 

Join Date: Nov 2004
Location: asdf
Casino cash: $4217963
This is a little difficult given the lack of context to the code. I'm assuming the outputs 3,5 & 6 are in relation to RGB color. If not disregard this message. I don't see how you would add intensity based on the pressure sensor unless it is saying pin 3 determines power. IF that is the case we want to tie that to valuer1 and I would have to have more info on how the colors are determined.

I rewrote the loop for what I think would give you a random changing light every second, but without more information on the board with regard to setting intensity, I can't help you there.

void loop() {

valeur1 = analogRead(A0);
delay(1000);
valeur2 = (200 / valeur1); //need context on what these are for
valeur3 = (valeur2 * valeur2); //need context on what these are for

valeur4 = random(255); // three random values. One for each RGB. If you use only one you will be limited to 255 colors.
valeur5 = random(255);
valeur6 = random(255);

analogWrite(3,valeur4);
analogWrite(5,valeur5);
analogWrite(6,valeur6);


}
Posts: 509
Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.Chazno is not part of the Right 53.
    Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump




All times are GMT -6. The time now is 08:54 AM.


This is a test for a client's site.
Fort Worth Texas Process Servers
Covering Arlington, Fort Worth, Grand Prairie and surrounding communities.
Tarrant County, Texas and Johnson County, Texas.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.