取消
显示结果 
搜索替代 
您的意思是: 

Arduino analog input

已解决!
转到解答

Hi

I am trying to get an analog signal from a potentiometer using Arduino UNO, but I don't see any thing on the front panel!!

I checked the port number, used both baud 115200 and 9600 and measured the potentiometer out voltage, it ranges between 0 and 5 volts so there is nothing wrong with the components but still no output on the front panel!! Any suggestion?

See please the attached picture.

Regards

Hatem

0 项奖励
1 条消息(共 15 条)
6,149 次查看

Do you get anything at all or just zero?

 

BTW: You do know that tha Arduino analog read is only going to return a number between 0 and 1023, you need to scale this to determine what voltage that represents.

 

Have you tested your setup using just the Arduno IDE and the serial monitor?

 

I am pretty sure there is basically the same analog read demo code in the Ardunio examples folder.

========================
=== Engineer Ambiguously ===
========================
0 项奖励
2 条消息(共 15 条)
6,125 次查看

I get only zero and I tested it with Arduino IDE, it works.

I tried two different Arduinos and still get only zero!

0 项奖励
3 条消息(共 15 条)
6,103 次查看

So what do you see in the Arduino IDE? 

Have you uploaded the LINX code to the Arduino?

0 项奖励
4 条消息(共 15 条)
6,098 次查看

On the IDE I see results on the serial port between 0 and 1023, I do not know what exactly you mean by uploading the LINX to the Arduino!!

0 项奖励
5 条消息(共 15 条)
6,094 次查看

So the LabVIEW code that you showed is part of the LIFA packet that need a speciel LIFA code to run on the Arduino. 

What is the code that is running on your Arduino?

0 项奖励
6 条消息(共 15 条)
6,089 次查看

So as I understand from you that I have to upload the LabVIEW code to the Arduino!! if yes how can I do that, I can choose the COM, the connection type, the baud. and the Arduino type which is UNO then I hit run!

0 项奖励
7 条消息(共 15 条)
6,084 次查看

No, not the LabVIEW code, but the LIFA arduino code. There should be a LIFA ino file that you can upload to the Arduino using the Arduino IDE. 

 

Here is a link that explain it: 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8ilSAC

0 项奖励
8 条消息(共 15 条)
6,077 次查看

ok so now when I upload the LIFA_Base I get an error message says (( this chip is not supported))

0 项奖励
9 条消息(共 15 条)
6,076 次查看

Have you selected the right board in the IDE? 

 

One thing to note is that LIFA is not supported any more, this means that it might not work with the newest Arduino IDE. 

For the newest IDE, you might need to switch to LINX. 

 

0 项奖励
10 条消息(共 15 条)
6,072 次查看