|
![]() |
#31 |
Bono & Grbac wasn't enough
Join Date: Oct 2000
Location: Sioux City, IA
Casino cash: $9423829
|
If you need a poll rigged, a mom to bang, or even code, your first stop shop is CP!
__________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advertise here: $19.99 a month |
Posts: 40,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#32 |
I love your mom
Join Date: Feb 2020
Location: Sturgeon Falls, Ontario
Casino cash: $-855043
|
|
Posts: 7,765
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#33 |
Bono & Grbac wasn't enough
Join Date: Oct 2000
Location: Sioux City, IA
Casino cash: $9423829
|
Billay's is available anytime
__________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advertise here: $19.99 a month |
Posts: 40,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#34 |
Starter
Join Date: Aug 2012
Casino cash: $-180000
|
Do you have any specs on the RGB strip and how the host system is connected to it (what are the three output pins connected to on the RGB strip)?
Edit: I guess it doesn't really matter. I'd start by just reading the analog input and putting that value on the three outputs and verify that he can see a color change based off the pressure input. I think it's been said a few times in this thread already but he needs to break it down into smaller chunks. Last edited by Grim; 10-14-2021 at 07:11 AM.. |
Posts: 716
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#35 | |
King Sandbagger
Join Date: Feb 2003
Location: The Summit, MO
Casino cash: $-930000
|
Quote:
|
|
Posts: 3,959
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#36 | |
2 Legit 2 Colquitt
Join Date: Sep 2010
Casino cash: $2335754
|
I'm not much into coding but the following doesn't make much sense.
Quote:
|
|
Posts: 4,886
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#37 | |
MVP
Join Date: Aug 2005
Casino cash: $3519212
|
Quote:
Also (and I've never worked with this Arduino stuff), since he already is setting up the serial port for comms, will Serial.print work as someone suggested? Or will that output over the current serial port link? |
|
Posts: 14,737
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#38 |
MVP
Join Date: Aug 2005
Casino cash: $3519212
|
|
Posts: 14,737
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#39 |
MVP
Join Date: Feb 2007
Location: Liberty, MO
Casino cash: $774112
|
Have him change to something other than coding. It looks like french
|
Posts: 17,150
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#40 | |
Veteran
Join Date: Aug 2002
Location: Kansas City, MO
Casino cash: $3876254
|
Quote:
When doing Arduino programming and debugging, the serial line is how you write and read data from the device as it is operating. In essence, your IDE compiles down the C++ sketch file into a binary, uploads that over the serial line to the Arduino device, and then resets it. The reset makes it execute your code. The serial connection remains open, and any messages from the Arduino are sent across. |
|
Posts: 1,223
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#41 | |
I love your mom
Join Date: Feb 2020
Location: Sturgeon Falls, Ontario
Casino cash: $-855043
|
Quote:
Normally I would spend the next few months and hundreds of hours learning some coding to be able to help him out but I have absolutely no interest . |
|
Posts: 7,765
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#42 |
Starter
Join Date: Oct 2017
Location: Marooned in the DC swamp
Casino cash: $4400400
|
I’m not a coder, (although I am an engineer by education) but I do know Arduino the company extremely well.
Where you want to go is the Arduino forum https://forum.arduino.cc/ There are 1M members and you are likely to find plenty of good ideas and assistance. |
Posts: 683
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#43 |
Starter
Join Date: Nov 2004
Location: asdf
Casino cash: $2017963
|
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: 522
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#44 |
Bono & Grbac wasn't enough
Join Date: Oct 2000
Location: Sioux City, IA
Casino cash: $9423829
|
This shit sure ain't assembler
__________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advertise here: $19.99 a month |
Posts: 40,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
#45 |
Veteran
Join Date: Aug 2002
Location: Kansas City, MO
Casino cash: $3876254
|
I just hope this kid renames the variables before turning in the code. If I were grading the assignment, I'd be raising an eyebrow if the variables were French.
![]() I once worked on some client's code, which was apparently written by a guy named Eric. Every variable in his code was prefixed with 'eric'. So the SQL DB connection was 'ericDbConn', and the result set was 'ericDbResult', the datarow object was 'ericDbRow', etc. I thought that was pretty damned hilarious! |
Posts: 1,223
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() ![]() |
|
|