我正在使用SIM900 GSM模块连接到我的AVR微控制器.我用FT232测试它以查看传输数据.First Micro发送AT它会响应OK
AT OK
AT+CMGF=1 OK
AT+CMGS="+9893XXXXXX" returns ERROR and doesn't show ">"
Run Code Online (Sandbox Code Playgroud)
谁能告诉我该怎么办?
我正在使用在 Android 操作系统中使用以太网端口的嵌入式系统,我想知道如何在我的应用程序中设置静态 IP 和掩码?
这是我的代码,我评论了我需要的东西.我尝试了一些代码,但似乎与Fragment不兼容.
public class main extends Fragment {
ImageButton imagebutton;
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.main, container, false);
imagebutton = (ImageButton) rootView.findViewById(R.id.im);
imagebutton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//Open Yes/No Dialog
//if Yes do something
}
});
}
}
Run Code Online (Sandbox Code Playgroud) 当我在我的代码中使用Scrollview时,我的背景图像会拉伸并滚动按钮.我只想按钮滚动,而不是背景.我附上了一张相关图片,你可以解决这个问题.这是XML文件:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/back"
android:orientation="vertical" >
<ImageButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/app"
android:layout_gravity="center"
android:background="@drawable/bluebutton"
android:layout_marginTop="80dp"
android:layout_marginRight="80dp"
android:layout_marginLeft="80dp"
/>
<ImageButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/moshiri"
android:background="@drawable/bluebutton"
android:layout_marginTop="8dp"
android:layout_marginRight="80dp"
android:layout_marginLeft="80dp"
/>
<ImageButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/about"
android:background="@drawable/bluebutton"
android:layout_marginTop="8dp"
android:layout_marginRight="80dp"
android:layout_marginLeft="80dp"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/exit"
android:background="@drawable/bluebutton"
android:layout_marginTop="8dp"
android:layout_marginRight="80dp"
android:layout_marginLeft="80dp"
/>
</LinearLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
android ×3
at-command ×1
avr ×1
dialog ×1
ethernet ×1
gsm ×1
ip ×1
java ×1
layout ×1
networking ×1
scrollview ×1
serial-port ×1
sms ×1