This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430G2553:尝试从声音传感器引脚获取模拟值

Guru**** 2552170 points
Other Parts Discussed in Thread: ENERGIA, LM393, MSP430G2553

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/613077/msp430g2553-trying-to-get-analog-value-from-a-sound-sensor-pin

器件型号:MSP430G2553
主题中讨论的其他器件:EnergiaLM393

您好!

我正在执行一个侧面项目、我想使用该项目将 RGB 条中的颜色从蓝色-绿色-红色更改为蓝色、具体取决于我从声音传感器(LM393)获得的模拟值(声音)。 我使用 Energia 进行编译、因为它比 Code Composer Studio 容易得多。我将声音检测器模块连接到 MSP430G2553的引脚5、我只是尝试从串行单一器中获取值。 但是、当尝试获取值(与检测器通信)时、我不会得到任何值。 这是我的代码。

Int SoundSensorPin = 7;   // MSP430上的引脚5、但与 Energia 的引脚7相关。
int sensorValue = 0;

void setup(){
Serial.begin(9600);

void loop(){
sensorValue = analogRead (soundSensorPin);

serial.println (sensorValue);

如果有人能给我指正确的方向、我会非常感激。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    你得到了什么价值?
    所有连接都是什么?