Welcome, Guest
Username: Password: Remember me

TOPIC: Arduino and Proview

Re: Arduino and Proview 12 years 1 month ago #3235

  • marc
  • marc's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 710
  • Thank you received: 70
  • Karma: 24
A couple of months ago a member named Ivo1260 made a small app. with qcreator.
The forum link is broken, so here it's again.
You can sent messages to the Arduino-Proview sketch without the use of Proview.
Attachments:
Please, use the Wiki if you succeeded your project or solved your problem. Share your work, so we can learn from each other.
The administrator has disabled public write access.

Re: Arduino and Proview 11 years 11 months ago #3493

  • marc
  • marc's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 710
  • Thank you received: 70
  • Karma: 24
Hi all,

Servo again.....(180 degrees, 5V and the Arduino)

In a project I have a chanAo which is the only chanAo.
In the Arduino sketch I want to read this analog value and map this to a pulse by using the standard servo libray from the Arduino (the USB communication between Proview and the Arduino is too slow to control a servo directly)

In the sketch from (/usr/pwr48/os_linux/hw_x86/exp/inc/pwr_arduino_uno.ino) I have the next code:

<<
// Write analog outputs
if ( msgSize == aoCnt) {
for ( i = 0; i < aoCnt; i++)

//Read the first Analog output from Proview and map this value to a servo on Do4
if ( i == 0)
{
degrees1 = map(msgData, 0, 255, 0, 179);
servo1.write(degrees1);

}
else

analogWrite( aoList, msgData);


>>

This is not working.

When I do exactly the same in the sketch by using a Do (debug flag has been set), Proview sends a value 64.

<<

// Write digital outputs

if ( msgSize == doSize + aoCnt) {
for ( i = 0; i < doSize; i++) {
for ( j = 0; j < 8; j++) {
if ( ((1 << j) & doMask) != 0) {
if ( ((1 << j) & msgData) != 0)
digitalWrite( i * 8 + j, HIGH);
else
digitalWrite( i * 8 + j, LOW);
}
}
}

for ( i = 0; i < aoCnt; i++)

//
//Test for the first digital output sent by Proview. If the button is pressed, Proview sends a messages with the value 64 --> the servo works in this case
if ( i == 0)
{
degrees1 = map(msgData, 0, 255, 0, 179);
servo1.write(degrees1);
}
else

analogWrite( aoList, msgData[doSize + i]);


>>

This works.

I can't find out why the "same" code works successfully when I map the Do part and is not working when I try to use the Ao,

Marc
Please, use the Wiki if you succeeded your project or solved your problem. Share your work, so we can learn from each other.
Last Edit: 11 years 11 months ago by marc.
The administrator has disabled public write access.

Re: Arduino and Proview 10 years 1 week ago #6182

  • moorsb
  • moorsb's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
  • Karma: 0
I am on the same page as you, Arduino Modbus TCP
I just ran across this site, and have not loaded the software yet. I have Modbus TCP on Arduino Mega 2560 using the wiznet chip, I also have it running on Arduino Nano and Micro using ENC28j60 talk about low cost.
The problem with the ENC28j60 is it takes CPU time away from the Arduino.

I want to run Proview on my Udoo Quad Board. I was wanting to see if anyone has cross compiled it for the Udoo?
The administrator has disabled public write access.
Time to create page: 7.901 seconds