女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

我的第一個鴻蒙手機小游戲 數字華容道

電子工程師 ? 來源:HarmonyOS技術社區 ? 作者:HarmonyOS技術社區 ? 2020-12-29 10:55 ? 次閱讀

12 月 16 號 HarmonyOS 2.0 手機開發者 Beta 版已經發布了,作為“1+8+N”戰略的重要入口和生態核心,怎么能少得了手機應用開發呢?今天將由深鴻會深大學習小組從零基礎開發第一個 HarmonyOS 手機小游戲——數字華容道(界面略丑陋,大佬別噴)。

本個 demo 將從零基礎開始完成鴻蒙小游戲 APP 在手機上的編譯在項目中我們所使用到的軟件為 DevEco Studio,下載地址為:

DevEco Studio 下載:
https://developer.harmonyos.com/cn/develop/deveco-studio#download

DevEco Studio 安裝教程

https://developer.harmonyos.com/cn/docs/documentation/doc-guides/software_install-0000001053582415

在項目中我們要實現的內容為數字華容道 APP 的開發。

打開引用首先為數字華容道的初始界面,點擊開始游戲即會切換到數字華容道的游戲界面。

進入數字華容道的游戲界面顯示 4*4 的方陣,方陣中分布有隨意打亂的 1 至 15 的數字和一個空白方格。

方陣下方顯示一個“重新開始”的按鈕和一個“返回”按鈕,點擊“重新開始”按鈕即會重新生成隨意打亂的 1 至 15 的數字和一個空白方格的方陣。

點擊“返回”按鈕即會切換到數字華容道的初始界面,最下方有四個指示不同方向箭頭的按鈕,點擊任一按鈕或向上、下、左、右任一方向滑動,空白方格周圍對應位置的方格便會隨之向對應的方向移動一格。

經過若干次滑動或點擊后,當所有的數字按順序排列后,則會彈出游戲成功的界面,再滑動或點擊也不會有任何變化。

01

創建項目

DevEco Studio 下載安裝成功后,打開 DevEco Studio,點擊左上角的 File,點擊 New,再選擇 New Project,選擇 Phone 選項,選擇默認的模板(Java 版),然后選擇保存路徑,將文件命名為 MyPhoneApplication(文件名不能出現中文或者特殊字符,否則將無法成功創建項目文件),最后點擊 Finish。

02

實現初始界面布局

首先,我們要先實現數字華容道的初始界面,點擊開始游戲即會切換到另一個空白的界面。

先在 entry>src>main>config.json 文件中最下方"launchType": "standard"的后面添加以下代碼。

并且將上方的“label”:“MyPhoneApplication”修改成"label": "數字華容道",這樣就實現去掉應用上方的標題欄和將應用名稱改為數字華容道了。

config.json 最下面部分代碼:
"orientation":"unspecified",
"name":"com.example.myphoneapplication.MainAbility",
"icon":"$media:icon",
"description":"$string:mainability_description",
"label":"數字華容道",
"type":"page",
"launchType":"standard",
"metaData":{
"customizeData":[
{
"name":"hwc-theme",
"value":"androidhwext:style/Theme.Emui.Light.NoTitleBar",
"extra":""
}
]
}

	

先將我們事先準備好的圖片復制粘貼到 entry>src>main>resources>base>media 文件夾中(ctrl+c、ctrl+v 復制粘貼),并且命名為 game,點擊 OK。

在 entry>src>main>resources>base>layout>ability_main.xml 中添加布局。

先將事先存在的 Text 組件刪去,添加 Image 圖片組件,引入我們剛才復制粘貼的圖片,再添加一個 Button 按鈕組件,加入唯一標識符 id 并配置好其他相應的屬性:

<DirectionalLayout
xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:height="match_parent"
ohos:width="match_parent"
ohos:orientation="vertical">

<Image
ohos:height="match_parent"
ohos:width="match_parent"
ohos:image_src="$media:game"
ohos:layout_alignment="center"
/>

<Button
ohos:id="$+id:button_game"
ohos:height="150"
ohos:width="515"
ohos:text_alignment="center"
ohos:top_margin="-810"
ohos:left_margin="250"
/>

DirectionalLayout>

在 entry>src>main>java>com.example.myphoneapplication>slice 中右鍵選擇 New>Java Class 增加一個空白的類以用來后面編寫數字華容道的游戲界面,并且命名為 SecondAbilitySlice。

將 entry>src>main>java>com.example.myphoneapplication>slice>SecondAbilitySlice 中的代碼修改成如下:

packagecom.example.myphoneapplication.slice;

importcom.example.myphoneapplication.ResourceTable;
importohos.aafwk.ability.AbilitySlice;
importohos.aafwk.content.Intent;

publicclassSecondAbilitySliceextendsAbilitySlice{

publicvoidonStart(Intentintent){
super.onStart(intent);

}

@Override
publicvoidonActive(){
super.onActive();
}

@Override
publicvoidonForeground(Intentintent){
super.onForeground(intent);
}
}

	
		④entry>src>main>java>com.example.myphoneapplication>slice>MainAbilitySlice 中的 onStart 函數中添加一個按鈕指向我們(2)中添加的按鈕。
		

添加一個響應點擊事件的函數,用 parsent 函數跳轉到 SecondAbilitySlice:

packagecom.example.myphoneapplication.slice;

importcom.example.myphoneapplication.ResourceTable;
importohos.aafwk.content.Intent;
importohos.agp.components.Button;
importohos.agp.components.Component;

publicclassMainAbilitySliceextendsohos.aafwk.ability.AbilitySlice{
@Override
publicvoidonStart(Intentintent){
super.onStart(intent);
super.setUIContent(ResourceTable.Layout_ability_main);

Buttonbutton=(Button)findComponentById(ResourceTable.Id_button_game);
button.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
present(newSecondAbilitySlice(),newIntent());
}
});

}

@Override
publicvoidonActive(){
super.onActive();
}

@Override
publicvoidonForeground(Intentintent){
super.onForeground(intent);
}
}

	

至此,這一部分就完成了。

03

實現數字的隨機打亂

然后我們要在數字華容道的游戲界面生成隨意打亂的1至15的數字和一個空白方格的方陣。

在 entry>src>main>java>com.example.myphoneapplication>slice>SecondAbilitySlice 編寫代碼。

先定義個一個位置布局 layout 和一個二維數組 grids,創建函數 initializeinitialize() 分別對其初始化,在 onStart 函數中調用函數 initializeinitialize():

privatefloatstarX,starY,distanceX,distanceY;
privateDirectionalLayoutlayout;
privateint[][]grids;

publicvoidonStart(Intentintent){
super.onStart(intent);

initialize();
}

publicvoidinitialize(){
layout=newDirectionalLayout(this);
grids=newint[][]{{1,2,3,4},{5,6,7,8,},{9,10,11,12},{13,14,15,0}};
}

然后定義函數 drawGrids(int[][] grids) 用于繪制 4*4 方陣和其二維數組對應的數字:

publicvoiddrawGrids(int[][]grids){
layout.setLayoutConfig((newComponentContainer.LayoutConfig(ComponentContainer.LayoutConfig.MATCH_PARENT,ComponentContainer.LayoutConfig.MATCH_PARENT)));

Component.DrawTasktask=newComponent.DrawTask(){
publicvoidonDraw(Componentcomponent,Canvascanvas){
PaintmPaint=newPaint();

mPaint.setColor(Color.GRAY);
RectFloatrect=newRectFloat(2,230,1078,1306);
canvas.drawRect(rect,mPaint);

for(introw=0;row4;row++){
for(intcolumn=0;column4;column++){
mPaint.setColor(Color.CYAN);
RectFloatrectFloat=newRectFloat(22+column*262,250+row*262,272+column*262,500+row*262);
canvas.drawRect(rectFloat,mPaint);

mPaint.setColor(Color.YELLOW);
mPaint.setTextSize(125);
if(grids[row][column]!=0){
if(grids[row][column]<10){
canvas.drawText(mPaint,String.valueOf(grids[row][column]),105+column*262,425+row*262);
}
else{
canvas.drawText(mPaint,String.valueOf(grids[row][column]),65+column*262,425+row*262);
}
}
}
}
}
};
layout.addDrawTask(task);
setUIContent(layout);
}

再定義函數 changeGrids(int[][] grids,int direction),每次接收一個方向,2 表示上移,-1 表示左移,1 表示右移,-2 表示下移,找出空白方格所在位置對應的二維數組下標,對應的方格和空白方格對應的二維數組的數值對調:

publicvoidchangeGrids(int[][]grids,intdirection){
introw_0=3;
intcolumn_0=3;
inttemp;
for(introw=0;row4;row++){
for(intcolumn=0;column4;column++){
if(grids[row][column]==0){
row_0=row;
column_0=column;
}
}
}
if(direction==-1&&(column_0+1)<=?3){
temp=grids[row_0][column_0+1];
grids[row_0][column_0+1]=grids[row_0][column_0];
grids[row_0][column_0]=temp;
}elseif(direction==1&&(column_0-1)>=0){
temp=grids[row_0][column_0-1];
grids[row_0][column_0-1]=grids[row_0][column_0];
grids[row_0][column_0]=temp;
}elseif(direction==2&&(row_0+1)<=3){
temp=grids[row_0+1][column_0];
grids[row_0+1][column_0]=grids[row_0][column_0];
grids[row_0][column_0]=temp;
}elseif(direction==-2&&(row_0-1)>=0){
temp=grids[row_0-1][column_0];
grids[row_0-1][column_0]=grids[row_0][column_0];
grids[row_0][column_0]=temp;
}
}

定義函數 createGrids(int[][] grids) 用于隨機生成一個表示方向的數字,循環調用函數 changeGrids(grids,direction) 用于隨機打亂二維數組對應的數字:

publicvoidcreateGrids(int[][]grids){
int[]array={-1,-2,1,2};

for(inti=0;i100;i++){
intrandom=(int)Math.floor(Math.random()*4);
intdirection=array[random];
changeGrids(grids,direction);
}
}

最后在 initialize() 函數中調用 createGrids(grids) 函數和 drawGrids(grids) 函數:

publicvoidinitialize(){
layout=newDirectionalLayout(this);
grids=newint[][]{{1,2,3,4},{5,6,7,8,},{9,10,11,12},{13,14,15,0}};
createGrids(grids);
drawGrids(grids);
}

至此,這一部分完成了。

04

實現滑動或點擊調換數字

添加“重新開始”和“返回”按鈕,在最下方添加四個指示不同方向箭頭的按鈕,點擊任一按鈕或向上、下、左、右任一方向滑動,空白方格周圍對應位置的方格便會隨之向對應的方向移動一格。

在 entry>src>main>java>com.example.myphoneapplication>slice>SecondAbilitySlice 編寫代碼。

先定義一個函數 drawButton() 用于繪制所有的按鈕,四個指示不同方向箭頭的按鈕分別添加四個響應點擊事件的函數。

分別調用對應的 changeGrids(grids,direction) 函數實現空白方格周圍對應位置的方格便會隨之向對應的方向移動一格,并調用 drawGrids(grids) 函數用于繪制新的方陣:
publicvoiddrawButton(){

Buttonbutton=newButton(this);
button.setText("重新開始");
button.setTextSize(100);
button.setTextAlignment(TextAlignment.CENTER);
button.setTextColor(Color.WHITE);
button.setMarginTop(1400);
button.setMarginLeft(80);
button.setPadding(20,20,20,20);
ShapeElementbackground=newShapeElement();
background.setRgbColor(newRgbColor(174,158,143));
background.setCornerRadius(100);
button.setBackground(background);
layout.addComponent(button);

Buttonbutton0=newButton(this);
button0.setText("返回");
button0.setTextSize(100);
button0.setTextAlignment(TextAlignment.CENTER);
button0.setTextColor(Color.WHITE);
button0.setMarginTop(-170);
button0.setMarginLeft(680);
button0.setPadding(20,20,20,20);
button0.setBackground(background);
layout.addComponent(button0);


ShapeElementbackground0=newShapeElement();
background0.setRgbColor(newRgbColor(174,158,143));
background0.setCornerRadius(100);

Buttonbutton1=newButton(this);
button1.setText("↑");
button1.setTextAlignment(TextAlignment.CENTER);
button1.setTextColor(Color.WHITE);
button1.setTextSize(100);
button1.setMarginLeft(500);
button1.setMarginTop(70);
button1.setPadding(10,0,10,0);
button1.setBackground(background0);
button1.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
changeGrids(grids,2);
}
});
layout.addComponent(button1);

Buttonbutton2=newButton(this);
button2.setText("←");
button2.setTextAlignment(TextAlignment.CENTER);
button2.setTextColor(Color.WHITE);
button2.setTextSize(100);
button2.setMarginTop(10);
button2.setMarginLeft(400);
button2.setPadding(10,0,10,0);
button2.setBackground(background0);
button2.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
changeGrids(grids,-1);
}
});
layout.addComponent(button2);

Buttonbutton3=newButton(this);
button3.setText("→");
button3.setTextAlignment(TextAlignment.CENTER);
button3.setTextColor(Color.WHITE);
button3.setTextSize(100);
button3.setMarginLeft(600);
button3.setMarginTop(-130);
button3.setPadding(10,0,10,0);
button3.setBackground(background0);
button3.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
changeGrids(grids,1);
}
});
layout.addComponent(button3);

Buttonbutton4=newButton(this);
button4.setText("↓");
button4.setTextAlignment(TextAlignment.CENTER);
button4.setTextColor(Color.WHITE);
button4.setTextSize(100);
button4.setMarginLeft(500);
button4.setMarginTop(10);
button4.setPadding(10,0,10,0);
button4.setBackground(background0);
button4.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
changeGrids(grids,-2);
}
});
layout.addComponent(button4);

drawGrids(grids);
}

然后添加一個函數 slideGrids() 為布局 layout 添加一個滑動事件,并獲取滑動開始與結束的坐標,并計算出大致的滑動方向,分別調用對應的 changeGrids(grids,direction) 函數實現空白方格周圍對應位置的方格便會隨之向對應的方向移動一格,并調用 drawGrids(grids) 函數用于繪制新的方陣,并在開頭添加相應的變量:

privatefloatstarX,starY,distanceX,distanceY;

publicvoidslideGrids(){
layout.setTouchEventListener(newComponent.TouchEventListener(){
@Override
publicbooleanonTouchEvent(Componentcomponent,TouchEventtouchEvent){
MmiPointpoint=touchEvent.getPointerScreenPosition(0);

switch(touchEvent.getAction()){
caseTouchEvent.PRIMARY_POINT_DOWN:
starX=point.getX();
starY=point.getY();
break;
caseTouchEvent.PRIMARY_POINT_UP:
distanceX=point.getX()-starX;
distanceY=point.getY()-starY;
break;
}
if(gameover()==false){
if(Math.abs(distanceX)>Math.abs(distanceY)){
if(distanceX>200){
changeGrids(grids,1);
}elseif(distanceX-200){
changeGrids(grids,-1);

}
}elseif(Math.abs(distanceX)abs(distanceY)){
if(distanceY>200){
changeGrids(grids,-2);
}elseif(distanceY-200){
changeGrids(grids,2);
}
}
}
drawGrids(grids);

returnfalse;
}
});
}

最后在 initialize() 函數中調用 slideGrids() 函數和 drawButton() 函數:

publicvoidinitialize(){
layout=newDirectionalLayout(this);
grids=newint[][]{{1,2,3,4},{5,6,7,8,},{9,10,11,12},{13,14,15,0}};
createGrids(grids);
slideGrids();
drawButton();
drawGrids(grids);
}

至此,這一部分完成了

05

實現游戲成功界面

點擊“重新開始”按鈕即會重新生成隨意打亂的 1 至 15 的數字和一個空白方格的方陣,點擊“返回”按鈕即會切換到數字華容道的初始界面,經過若干次滑動或點擊后,當所有的數字按順序排列后,則會彈出游戲成功的界面,再滑動或點擊也不會有任何變化。

在 entry>src>main>java>com.example.myphoneapplication>slice>SecondAbilitySlice 編寫代碼。

首先定義一個函數 drawText() 用于繪制游戲成功字樣:

publicvoiddrawText(){
Texttext=newText(this);
text.setText("游戲成功");
text.setTextSize(100);
text.setTextColor(Color.BLUE);
text.setTextAlignment(TextAlignment.CENTER);
text.setMarginsTopAndBottom(-2000,0);
text.setMarginsLeftAndRight(350,0);
layout.addComponent(text);
setUIContent(layout);

}

然后定義一個函數 gameover() 用于判斷二維數組的數字是否按順序排列,當二維數組的數字按順序排列時返回 true,否則返回 false:

publicbooleangameover(){
int[][]gameoverGrids={{1,2,3,4},{5,6,7,8,},{9,10,11,12},{13,14,15,0}};
for(introw=0;row4;row++){
for(intcolumn=0;column4;column++){
if(grids[row][column]!=gameoverGrids[row][column]){
returnfalse;
}
}
}

returntrue;
}

再在 drawButton() 函數中重新開始按鈕中添加一個響應點擊事件的函數,用于調用函數 initialize() 實現重新生成隨意打亂的 1 至 15 的數字和一個空白方格的方陣,返回按鈕中添加一個響應點擊事件的函數,用 parsen 函數返回數字華容道的初始界面,四個指示不同方向箭頭的按鈕的響應點擊事件的函數中增加一個判斷,當函數 gameover() 返回為 false 時才調用各自的 changeGrids(grids,direction) 函數,最后增加一個判斷,當函數 gameover() 返回為 true 時調用函數 drawText():

publicvoiddrawButton(){//部分代碼沒有貼出,可自行下載源代碼查看

button.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
initialize();
}
});

button0.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
present(newSecondAbilitySlice(),newIntent());
}
});

button1.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
if(gameover()==false){
changeGrids(grids,2);
}
}
});

button2.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
if(gameover()==false){
changeGrids(grids,-1);
}
}
});

button3.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
if(gameover()==false){
changeGrids(grids,1);
}
}
});

button4.setClickedListener(newComponent.ClickedListener(){
@Override
publicvoidonClick(Componentcomponent){
if(gameover()==false){
changeGrids(grids,-2);
}
}
});

if(gameover()){
drawText();
}
}

在函數 slideGrids() 函數中增加一個判斷,當函數 gameover() 返回為 false 時才調用 changeGrids(grids,direction) 函數,最后增加一個判斷,當函數 gameover() 返回為 true 時調用函數 drawText():

publicvoidslideGrids(){//部分代碼沒有貼出,可自行下載源代碼查看
if(gameover()==false){
//{...}
}
if(gameover()){
drawText();
}
}

至此,整個 demo 全部完成了。

06

結語

以上就是數字華容道小游戲在手機的主要編寫思路以及代碼,源碼將放在附件中,歡迎大家下載,感興趣的讀者可以自行跟著編寫學習,相信你們也能夠完成的。

此前已經在運動手表上成功開發了:HarmonyOS 運動手表游戲合并、HarmonyOS 手表游戲——數字華容道,同樣是深鴻會深大小組學習完 HarmonyOS 后自行開發的一個鴻蒙 demo,詳細講述了數字華容道在鴻蒙手機上開發思路。

深鴻會深大學習小組是一群熱衷于學習鴻蒙相關知識和開發鴻蒙相關應用的開發者們,我們的學習項目為:荔園 Harmony、Awesome-HarmonyOS_木棉花,同時也歡迎與各位感興趣的讀者一起學習 HarmonyOS 開發,相互交流、共同進步。

責任編輯:xj

原文標題:我的第一個鴻蒙手機小游戲!(附源碼)

文章出處:【微信公眾號:HarmonyOS技術社區】歡迎添加關注!文章轉載請注明出處。


聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • 手機游戲
    +關注

    關注

    0

    文章

    19

    瀏覽量

    9060
  • 鴻蒙系統
    +關注

    關注

    183

    文章

    2639

    瀏覽量

    67731
  • OpenHarmony
    +關注

    關注

    27

    文章

    3835

    瀏覽量

    18175

原文標題:我的第一個鴻蒙手機小游戲!(附源碼)

文章出處:【微信號:gh_834c4b3d87fe,微信公眾號:OpenHarmony技術社區】歡迎添加關注!文章轉載請注明出處。

收藏 人收藏

    評論

    相關推薦
    熱點推薦

    開源鴻蒙圖形與游戲分論壇圓滿舉辦

    近日,開源鴻蒙開發者大會2025(OHDC.2025)圖形與游戲分論壇在深圳圓滿舉辦。本次分論壇由開源鴻蒙圖形SIG & 游戲SIG組組長、華為終端BG圖形TMG主任黃然,以及開源
    的頭像 發表于 06-05 15:30 ?233次閱讀

    鴻蒙5開發寶藏案例分享---多開發實例(游戲

    ?【開發者必看】鴻蒙隱藏寶箱大公開!這些實戰案例讓你的開發效率翻倍! 哈嘍各位開發者小伙伴!今天要和大家分享拍大腿的發現——原來鴻蒙
    發表于 06-03 18:22

    全鏈路賦能游戲鴻蒙化適配,鴻蒙游戲開發者服務煥新升級

    3月14日,華為游戲中心在成都開展了鴻蒙游戲開發者服務日線下活動。本次活動吸引了百余位游戲廠商代表以及開發者參與。華為線技術專家團隊與眾多
    的頭像 發表于 03-17 09:25 ?374次閱讀
    全鏈路賦能<b class='flag-5'>游戲</b><b class='flag-5'>鴻蒙</b>化適配,<b class='flag-5'>鴻蒙</b><b class='flag-5'>游戲</b>開發者服務煥新升級

    如何安裝模擬器玩nes小游戲-基于米爾瑞芯微RK3576開發板

    本篇源自:優秀創作者 小手涼涼本文將介紹基于米爾電子MYD-LR3576開發板(米爾基于瑞芯微 RK3576開發板)的安裝模擬器玩nes小游戲方案測試。 核心板系統 操作系統鏡像文件說明
    發表于 02-08 12:10

    原生鴻蒙第一個出圈的,為什么是安全?

    屬于更加安全、可信、便捷的數字未來,也屬于今天的你我
    的頭像 發表于 01-11 15:53 ?4041次閱讀
    原生<b class='flag-5'>鴻蒙</b><b class='flag-5'>第一個</b>出圈的,為什么是安全?

    ADS1274用DRDY+TDM輸出模式下,讀到的第一個字節是無效的,為什么?

    今天調試中發現問題,1274在用DRDY+TDM輸出模式下,讀到的第一個字節是無效的! 配置是4通,在DRDY下降沿產生后,等待5us(采樣率25K,即間隔40us)給出SPI
    發表于 01-08 08:17

    藍橋杯的第一個項目,點亮LED

    第一節IO簡介GPIO是通用輸入/輸出端口的簡稱,是STM32可控制的引腳。GPIO的引腳與外部硬件設備連接,可實現與外部通訊、控制外部硬件或者采集外部硬件數據的功能。每個GPIO內部都有這樣的
    的頭像 發表于 01-02 21:02 ?622次閱讀
    藍橋杯的<b class='flag-5'>第一個</b>項目,點亮<b class='flag-5'>一</b><b class='flag-5'>個</b>LED

    ADS1299在DAISY-CHAIN模式下只能配置第一個AD嗎,那后面幾個都是要怎么配置寄存器,都和第一個樣嗎?

    各位朋友大家好,現在準備用STM32和5片ADS1299組成40通的EEG 采樣系統,計劃使用ADS1299的DAISY-CHAIN 功能,
    發表于 12-20 06:47

    DAC8734只能把第一個接收到的數字數據輸出,有哪些原因導致的呢?

    一個發送的數據時序沒問題。但DAC8734只能把第一個接收到的數字數據輸出,用的是TI公司自己的DAC8734EVM。可能有哪些原因導致的呢?是上電順序的原因嗎?
    發表于 12-19 09:17

    FPGA打磚塊小游戲設計思路

    ? 交流問題 ? Q :FPGA打磚塊小游戲,如何基于FPGA用verilog語言在Vivado平臺上寫打磚塊小游戲,最好能用到PS2與VGA。 A :以下是基于 FPGA? Ve
    的頭像 發表于 12-09 16:57 ?802次閱讀

    鴻蒙系統手機MediaCodec編碼dequeueOutputBuffer直返回-1

    webrtc在鴻蒙的華為手機上使用MediaCodec 進行H264編碼時,出現dequeueOutputBuffer直返回-1的問題。 編碼器設置如下: 這個錯誤碼并不是開始編碼
    發表于 12-02 11:01

    ADS131A04在復位后以READY字進行響應,在第一個幀中接收到的響應不正確,為什么?

    幀,則在第一個幀中接收到的響應不正確,而后續響應是正確的。為什么復位后第一個幀中的 READY 響應不正確?
    發表于 11-25 08:11

    LMK1C1104第一個cycle在CLKOUT中丟失,為什么?

    LMK1C1104: CLKIN的第一個cycle在CLKOUT中丟失,詳情請參照關聯問題
    發表于 11-11 07:12

    拿下多個“世界第一”,TDK InvenSense 陀螺儀大有來頭

    面向智能手機的集成三軸運動處理解決方案; 2010年,推出世界上第一個單芯片集成六軸MotionTracking?(運動追蹤)設備; 2012年,推出世界上第一個集成九軸
    的頭像 發表于 07-15 09:46 ?1336次閱讀
    拿下多個“世界<b class='flag-5'>第一</b>”,TDK InvenSense 陀螺儀大有來頭

    與屏幕起發送的第一個UART數據時出現初始崩潰,但僅在第一次閃存時出現,為什么?

    其他人在閃爍并發送 UART 數據字符后遇到此問題,導致以下問題,在刷新芯片并崩潰后,在手動重置它后,它工作正常,完全沒有問題,但是
    發表于 07-09 07:39