Expected Primary-expression

Page 1 of 1

1 Replies - 136 Views - Last Post: 25 February 2018 - 04:28 AM Rate Topic: -----

#1 AussieNinja   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 25-February 18

Expected Primary-expression

Posted 25 February 2018 - 04:24 AM

hello,
I am having trouble with this code and would love it if some one would point out all of my flaws :)/>/>
it wants a "primary-Expression" before "const" and "eventName"
i have googled a "primary expression" and i couldn't find out what to put there.


Code

[int D = A4;
int val = 0;
const char *eventName = "Pressure";
int data = val;
void setup() {

}

void loop() {
val = analogRead(D)/25-20;
delay(100);
Particle.publish(const char *eventName const char data);
Particle.publish(String eventName String data);

}]

P.S. it is hopefully going to be for measuring pressure from a tank and displaying its percentage of "fullness" :)/>/>
Thankyou So Much in advance
AussieNinja

Is This A Good Question/Topic? 0
  • +

Replies To: Expected Primary-expression

#2 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 825
  • View blog
  • Posts: 3,337
  • Joined: 13-June 14

Re: Expected Primary-expression

Posted 25 February 2018 - 04:28 AM

Closing duplicate thread.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1