- 博客(14)
- 收藏
- 关注
原创 在AndroidStudio里插入图标的步骤
①在app下右键点击New ②选择Vector Asset③选中之后就能够看到这样的页面点击ClipArt,在里面就可以选择自己想要插入的图标了。
2022-11-11 21:57:50
2021
原创 AndroidStudio实现空气质量显示界面
效果图:————————代码参考———————①在layout里创建一个xml文件 编入:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_par
2022-11-08 21:48:46
1213
原创 keil5串口接收数据实验
创建一个main.c 编入:#include "stm32f10x.h"#include "delay.h"#include "led.h"#include "USART.h"#include "stdio.h"int main(void){ LED_Init(); Delay_Init(); USART1_Init(); while(1){printf("hello");//USART_SendData(USART1
2022-11-08 20:18:02
1922
原创 两个按键控制CC2530单片机LED的亮灭
要求:实现两个按键控制CC2530单片机LED的亮灭。代码参考:#include "ioCC2530.h"void Delay(long t){ while(t--) { asm("nop"); //空操作 asm("nop"); asm("nop"); asm("nop"); asm("nop"); asm("nop"); }}void led_init(void){ P1DIR |=0
2022-11-08 20:07:48
2062
原创 一个按键控制CC2530单片机LED亮灭
要求:实现一个按键控制LED的亮灭。代码参考:#include "ioCC2530.h"void Delay(long t){ while(t--) { asm("nop"); //空操作 asm("nop"); asm("nop"); asm("nop"); asm("nop"); asm("nop"); }}void led_init(void){ P1DIR |=0X02;//P1_1 P1SEL=P1SEL&am
2022-11-08 20:03:08
1074
原创 Android studio用帧布局实现霓虹灯界面
效果图:代码:<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:foregroundGravity="bottom|right
2022-10-27 22:50:14
1735
原创 Android studio设计一个简单的登录界面
效果图:代码:<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/图片文件名"
2022-10-27 22:39:04
2686
原创 Android studio用表格布局实现简易计算机界面设计
效果图:代码:<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="自定义一个
2022-10-27 22:24:32
3182
原创 Java方法的调用
例子:public class MyClass {/*主方法*/ public static int max(int num1,int num2){ int result; if (num1>num2) result=num1; else result=num2; return result;/*返回两个整数变量中的最大值*/ } pub
2022-10-06 22:23:36
678
原创 Java创建一个简单的Dog类
要求:创建一个Dog类,包含以下属性和方法:属性:名字、颜色方法:叫、跑代码参考:public class Dog { String name; String color; public void bark(){ System.out.println("little dog"+name+"barked three times"); } public void run(){ System
2022-10-06 22:14:06
4929
原创 java用Array对学生成绩排序
代码:package com.array.test;import java.util.Arrays;import java.util.Scanner;/*** 录入学生成绩,升序排列后输出*/public class ArraySort { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.pri
2022-09-29 22:28:38
566
原创 Android studio 求数组最大值
Android studio求数组最大值代码:package com.example.lib;import java.util.Scanner;public class MyClass { public static void main(String[] args) { double[]myList={输入数组}; double max=myList[0]; for(int i=1;i<myList.length
2022-09-29 22:23:24
1031
原创 简单的LED交替闪烁程序
使STM32单片机LED交替闪烁创建一个main.c编入:#include "stm32f10x.h"#include "led.h"#include "delay.h"int main(void){LED_Init();Delay_Init();while(1){GPIO_ResetBits(GPIOB,GPIO_Pin_5); GPIO_SetBits(GPIOE,GPIO_Pin_5);DelayMs(500);G
2022-09-27 16:26:13
4494
3
原创 最原始简单的STM32单片机点灯
一个最原始简单的STM32单片机点灯程序:#include "stm32f10x.h"int main(void){ GPIO_InitTypeDef GPIO_Inistatructure; RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE); GPIO_Inistatructure.GPIO_Pin=GPIO_Pin_5; GPIO_Inistatructure.GPIO_Mode=GPIO_M
2022-09-27 16:09:28
562
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人