sensslen / LibLanc

Arduino Library to communicate to Lanc enabled Cameras
MIT License
16 stars 2 forks source link

WHICH BOARD TO USE #16

Open karl8solutions opened 1 week ago

karl8solutions commented 1 week ago

I CONFIRMED THAT I CAN UPLOAD EXAMPLES, JUST NOT THIS ONE. WHAT ARDUINO DID YOU USE TO TEST THIS, OR DOES IT NOT MATTER? ALSO, MY IDE KEEPS GIVING A MESSAGE THAT THE LIBRARY NEEDS THE MEMORY TO BE RESOLVED. I AM USING AN ARDUINO NANO. THANKS.

sensslen commented 1 week ago

Hi @karl8solutions, no need for shouting here. Over here https://github.com/sensslen/LibLanc/issues/15 I provided two possible resolutions for your problem. It appears that arduino for avr microcontrollers does not include the stl. Therefore you will need another library that provides stl support to use LibLanc, as it relies on the stl (memory).

As stated before, please have a look at https://github.com/maniacbug/StandardCplusplus. Also make sure you include #include before including LibLanc.h

sensslen commented 1 week ago

I'm currently using an esp32 based board with the library which provides stl support out of the box which is why it just works.

karl8solutions commented 1 week ago

Simon,

What Library do I need to download for the #include function? I keep getting the error regarding this include item saying there is no file or directory.

K.

Karl Adair | Electronic Engineering Tech.

O: 321 804 8200 | C: 386 320 8629

@.**@.>

[8K Logo Square Small]


From: Simon Ensslen @.> Sent: Wednesday, October 16, 2024 3:04 AM To: sensslen/LibLanc @.> Cc: Karl Adair @.>; Mention @.> Subject: Re: [sensslen/LibLanc] WHICH BOARD TO USE (Issue #16)

I'm currently using an esp32 based board with the library which provides stl support out of the box which is why it just works.

— Reply to this email directly, view it on GitHubhttps://github.com/sensslen/LibLanc/issues/16#issuecomment-2415905765, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APYHQQKHGBOENLEU3P66NSTZ3YFYLAVCNFSM6AAAAABP75Z3XSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVHEYDKNZWGU. You are receiving this because you were mentioned.Message ID: @.***>

sensslen commented 1 week ago

Please read my previous comments.

DaddyShizzle commented 1 week ago

Sorry I was not yelling just left my caps on by accident. I downloaded the C++ library, thank you for that. Are there any other libraries I need, I included all the avrstl libraries I could, to test if it would work?

DaddyShizzle commented 1 week ago

Also, how does this look for Lanc Master firmware that would normally come from a camera. Do you have any pointers? Also, when I hook up serial commands to the external video recorders Lanc port, the Arduino stops sending serial until I unplug it again. It freezes but does not lose power.

const int lancPin = 1; //arduino nano tx pin const int bitPeriod = 104; // Bit period in microseconds (9600 baud)

void setup() { pinMode(lancPin, OUTPUT); digitalWrite(lancPin, HIGH); Serial.begin(9600); }

void loop() { if (Serial.available()) { byte command = Serial.read(); sendLancCommand(0x18, command); } }

void sendLancCommand(byte addr, byte command) { byte data[2]; data[0] = addr; data[1] = command; for (int i = 0; i < 2; i++) { sendLancByte(data[i]); } }

void sendLancByte(byte data) { for (int i = 0; i < 8; i++) { if (data & 0x80) { digitalWrite(lancPin, HIGH); } else { digitalWrite(lancPin, LOW); } delayMicroseconds(bitPeriod); data <<= 1; } digitalWrite(lancPin, HIGH); // Stop bit delayMicroseconds(bitPeriod); }

sensslen commented 1 week ago

Hi @karl8solutions, I'm sorry to disappoint you. Github is not the right platform for your requests. It seems you are trying to learn how to use Arduino and want to learn by making a project that involves communication with video equipment using the lanc protocol. While LibLanc can solve some of this, you should really first gain a basic understanding on how c/c++ and electronics work.

Feel free to open issues when there is an issue with the library. If you have questions on how to use it, I will try to point you to resources that can help. However I will not review your code and correct it.