[WP8.1] Arduino Nano + WIndows Phone 8.1应用程序 [英] [WP8.1]Arduino Nano + WIndows Phone 8.1 application 
问题描述
您好。我正在使用Arduino Nano和Windows Phone 8.1应用程序,并通过HT-05蓝牙模块为我的项目连接它们。在应用程序中我有按钮,它产生一些噪音(例如警报)。说实话,我完全不熟悉Arduino,
所以问题是:是否可以编写程序,这将使应用程序上的按钮自动按下,以便播放警报?
谢谢。
< blockquote>
Hi He1senberg,
如果你想在同一个应用程序中的按钮点击事件中调用该函数,你可以将该函数放在click事件之外并从另一个地方调用它,例如
DispatcherTimer 。如果我误解你,请告诉我。
private void Button_Click(object sender,RoutedEventArgs e)
{
SendCommand();
}
public void SendCommand()
{
//制造一些噪音
}
最好的问候,
David
Hi. I'm using Arduino Nano and Windows Phone 8.1 application, and connect them by means of HT-05 Bluetooth module for my project. In the application I have the button, which makes some noise(e.g. alarm). To be honest, I'm not familiar with Arduino completely,
so the question is: is it possible to write a program, which will make the button on the application be pressed automatically, so that the alarm is played?
Thank you.
Hi He1senberg,
If you want to call the function in button click event in the same application, you may put the function out of the click event and call it from another place such as in DispatcherTimer. If I misunderstand you, please let me know.private void Button_Click(object sender, RoutedEventArgs e) { SendCommand(); } public void SendCommand() { // make some noise }Best Regards,
David
这篇关于[WP8.1] Arduino Nano + WIndows Phone 8.1应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!