I program the Arduino mega in Code Blocks. I refer to the problem that sometimes I do not work command and after moving a few lines down always is OK.
When i try compile with IDE1.6 all is OK
example
using Serial.print ("1234") instead of 3 transferred point.
digitalWrite (31.1) - if the command was at the beginning of the function that no worked.
Can you post the code that does not work here ? Otherwise we are working in the dark.
What should the code do and what should it do ? Are there any error messages ?
It will almost certainly be easier in the long run for you to use the IDE so perhaps this is time to start.
system
June 26, 2015, 11:48am
3
Please post your code.
Use code tags.
i have problems with HEAT1_EN and HEAT2_EN. Comment saying what is happening.
digitalWrite(HEAT1_EN, 1);
digitalWrite(HEAT2_EN, 1);
void Pins::WrPins(int pole[])
{
Serial.println("pins");
Serial.print(pole[20]);
//digitalWrite(HEAT1_EN, pole[20]);
Serial.print(pole[21]);
//digitalWrite(HEAT2_EN, pole[21]);
digitalWrite(HEAT1_EN, 1); //Then the port in 0
digitalWrite(HEAT2_EN, 1); //Then the port in 0
digitalWrite(SOL1_EN, pole[22]);
digitalWrite(SOL2_EN, pole[23]);
digitalWrite(SOL3_EN, pole[24]);
digitalWrite(SOL4_EN, pole[25]);
digitalWrite(SOL5_EN, pole[26]);
digitalWrite(SOL6_EN, pole[27]);
digitalWrite(COMPR_EN, pole[28]);
//digitalWrite(LEDU28,pole[29]);
//digitalWrite(LEDU30,pole[30]);
//digitalWrite(LEDU31,pole[31]);
//digitalWrite(LEDU34,pole[32]);
digitalWrite(LEDU28,pole[20]);
digitalWrite(LEDU30,pole[21]);
digitalWrite(LEDU31,pole[28]);
digitalWrite(LEDU34,pole[10]);
digitalWrite(CPLD_RES,pole[41]);
digitalWrite(CENTRAL_STP ,pole[42]);
digitalWrite(CPLD_ERR_CLR,pole[43]);
digitalWrite(SSad,pole[58]);
digitalWrite(SSfpga,pole[59]);
pole[10]=digitalRead(CPLD_INT);
digitalWrite(HEAT1_EN, 1); //Then the port in 1
digitalWrite(HEAT2_EN, 1); //Then the port in 1
}
system
June 26, 2015, 12:04pm
5
When I write "please post your code", the "all" is implicit.