工業製造
産業用モノのインターネット | 工業材料 | 機器のメンテナンスと修理 | 産業プログラミング |
home  MfgRobots >> 工業製造 >  >> Manufacturing Technology >> 製造プロセス

JX Wave Generator

コンポーネントと消耗品

>
Arduino Nano R3
試したことはありませんが、Arduinoモデルならどれでも使用できると思います
× 1
>
ディスプレイSH1106I2C Oled 128x64ピクセル(4ピン)
× 1
AD9833DDSモジュール
× 1
プッシュボタン付きロータリーエンコーダー
これにははんだごてが必要です
× 1
ロータリーエンコーダモジュール
ブレッドボードの取り付けには、これが適しています
× 1
5Vリレーモジュール(オプション)
オプション、AC / DC出力カップリングモードを変更する必要がない場合。これをブレッドボードに取り付ける場合より良い
× 1
リレーリード5V500オーム
これは小信号に最適ですが、はんだごてが必要です。500オームのコイルを使用すると、 Arduinoデジタルピン(10mA)に直接接続します。
× 1
コンデンサ10µF
× 1
コンデンサ10nF
ポリエステルコンデンサ
× 1
AC-DC 100-220V〜5V降圧電源モジュール
オプション、USB経由で接続されていないときに回路に電力を供給するため
× 1

必要なツールとマシン

>
はんだごて(汎用)
ブレッドボードでプロジェクトをテストする場合は必須ではありません

アプリとオンラインサービス

image2cpp
カスタムアイコンをPROGMEMの16進形式に変換するには

このプロジェクトについて

長い間、私はオシロスコープの購入を延期してきました。今、それを購入した後、オーディオ回路などを診断するために不可欠な、趣味で使用するための安価な信号発生器も手に入れる時が来ました。エレクトロニクスとコンピューティングに対する2つの情熱を組み合わせることで、Arduinoを使って自分でそれを行うのが最善です。

機能

  • 1 Hz〜999999Hzの出力周波数
  • 周波数変動の2つのモード:対数と1桁
  • 3種類の波、正弦波、三角波、正方形波
  • ACまたはDC出力カップリング
  • 2つの事前定義された周波数値の間で継続的にスイープする機能
  • 1つのノブだけで制御
  • 古いディスプレイの寿命を維持するための統合スクリーンセーバー

クイックリファレンス

プロトタイプ

組み立て済みの10A接点のリレーモジュールを使用しました。現時点ではマイクロリードリレーがなかったため、パワーリレーが不要な場合は、トランジスタのダイオードと抵抗を避けるのが最適です。 ArduinoデジタルPINは最大40mAを供給できるため、電気機械式リレーを120/150オームのコイルに直接接続することはできません。

常に非常に注意してください 主電源電圧を使用する場合!

感電や皮膚や目への損傷の危険性があります。
1つしかない生活に気をつけてください!

コード

  • JX_Wave_Generator_8.7.7.ino
  • JXWG_Defs.h
  • JXWG_Graphics.h
JX_Wave_Generator_8.7.7.ino C / C ++
バージョン8.7.7。 2021年1月16日のマイナーリビジョン
 / * Copyright(c)2020 Januxこれにより、このソフトウェアおよび関連するドキュメントファイル(「ソフトウェア」)のコピーを取得するすべての人に、無料で許可が与えられます。ソフトウェアのコピーを使用、コピー、変更、マージ、公開、配布、サブライセンス、および/または販売する権利を含むがこれらに限定されない、ソフトウェアの提供先の人にそうすることを許可する、上記の著作権通知およびこの許可通知は、本ソフトウェアのすべてのコピーまたは実質的な部分に含まれるものとします。本ソフトウェアは「現状有姿」で提供され、商品性、特定目的への適合性、および非侵害の保証を含むがこれらに限定されない、明示または黙示を問わず、いかなる種類の保証もありません。いかなる場合も、作者または著作権所有者は、契約、不法行為、またはその他の行為にかかわらず、ソフトウェアまたはソフトウェアの使用またはその他の取引に起因する、または関連する、いかなる請求、損害、またはその他の責任についても責任を負わないものとします。ソフトウェア。構成保存ロードコードは、ノルウェーの作成WebサイトのRagnar RanyenHombによる記事「Arduinoで構成をロードおよび保存する方法」のオリジナルのアイデアを発展させたものです。* /#include "JXWG_Defs.h" #include "JXWG_Graphics .h "void setup(){//単純なエンコーダーと3x10Kプルアップ抵抗を使用している場合は、この設定をpinMode(PinA、INPUT);の下に適用します。 pinMode(PinB、INPUT); pinMode(PinS、INPUT); // 3x10K抵抗なしで単純なエンコーダーを使用している場合は、次のツリー行を使用します// pinMode(PinA、INPUT_PULLUP); // pinMode(PinB、INPUT_PULLUP); // pinMode(PinS、INPUT_PULLUP); //ほとんどのPCB溶接エンコーダはすでにピンAとピンBにプルアップ抵抗を備えていますが、スイッチピンにはありません//次に以下の設定を使用します// pinMode(PinA、INPUT); // pinMode(PinB、INPUT); // pinMode(PinS、INPUT_PULLUP); digitalWrite(PinA、HIGH); digitalWrite(PinB、HIGH); digitalWrite(PinS、HIGH); pinMode(PinCoupling、OUTPUT); //結合モードEncoder.setDebounceDelay(5); display.begin(SH1106_SWITCHCAPVCC、0x3C); // I2Cアドレスで初期化します0x3C(128x64の場合)display.clearDisplay(); //display.setRotation(2); //ディスプレイを逆さまにマウントする場合は、この行のコメントを解除しますWire.begin(); //マスターとしてi2cバスに参加TWBR =5; // freq =615kHz period =1.625uS //エンコーダスイッチプッシュイベントを割り当てて、Arduinoの1ピン3を割り込みますattachInterrupt(digitalPinToInterrupt(PinS)、encoderSwitch、FALLING); DDS_Init(); // DDSモジュールを初期化します; setConfig(); //設定をロードして起動値を設定します} // ---> end setup()void loop(){JX_WaveGenerator_MAIN();} // ------------------- -------------------------------------------------- -------------------------------------------------- ------------------ // JX WaveGeneratorMAIN関数// ------------------------ -------------------------------------------------- -------------------------------------------------- ------------- void JX_WaveGenerator_MAIN(){バイトエンコーダースピン=Encoder.rotate(); //エンコーダの回転方向1 =CW、2 =CCWバイトencoderLongPush =Encoder.pushLong(1000); //エンコーダロングプッシュイベントlonglStep =0; //現在の周波数ステップ値longwTime =600000; // 10分if(encoderPush)delay(250); if(encoderSpin){cTime =millis(); } else {if(millis()-cTime> wTime){ScreenSaver(); }} switch(mode){case LOGARITHMIC:// 0 // ----------------------------------- -------------------------------------------------- ---------------------------------------------- //モードLOGARITHMIC :対数ステップでのエンコーダ回転変化周波数1,10,100,1000,10000,100000 Hz // ------------------------------ -------------------------------------------------- -------------------------------------------------- --if(encoderSpin){if(lFreq> =1){lStep =AutoStep(lFreq、encoderSpin); //対数ステップを計算します} else if(_CouplingMode ==OFF){//結合モードがOFFに設定されている場合resetCouplingMode(); // Frequencyが0でない場合のデフォルトの結合モードを設定encoderSpin =0; //最初のスピンをスキップ} if(encoderSpin ==CW &&lFreq <=999999 --lStep){//スピンCWは周波数をインクリメントlFreq + =lStep; } if(encoderSpin ==CCW &&lFreq> =lStep + 1){//スピンCCWは周波数をデクリメントしますlFreq- =lStep; } DDS_FrequencySet(lFreq、Wave [_WaveType]); //頻度値をDDSモジュールに送信しますdisplayFrequency(lFreq); //フォーマットされた周波数を送信してlLastFreq =lFreq;を表示します//現在の周波数を保存} // ------------------------------------------ -------------------------------------------------- --------------------------------------- //ワークモードLOGARITHMIC:エンコーダープッシュスイッチをOPTIONSモードに// ------------------------------------------------ -------------------------------------------------- --------------------------------- if(encoderPush){encoderPush =false; //プッシュフラグをクリアdrawSymbol(1); //矢印記号を描画しますselectIcon(0、WHITE); //最初のアイコンの周りに境界線を描画しますidx =0; idy =0; //ポインタをリセットしますvarmode =OPTIONS; //モードに移動OPTIONS} break; //終了モード対数ケースSINGLEDIGIT:// 1 // ------------------------------------- -------------------------------------------------- ---------------------- //サブモードSINGLEDIGIT:エンコーダーの回転でカーソルを左右に移動// -------------- -------------------------------------------------- --------------------------------------------- if(encoderSpin){ if(encoderSpin ==CW &&idx  0)idx--; //反時計回りに減少するポインタ// ------------------------------------------- -------------------------------------------------- --------------- // idxが0〜5の場合、周波数の数字を選択します// --------------------- -------------------------------------------------- ------------------------------------- if(idx> =0 &&idx  =MAXDIGIT &&idx <=MAXDIGIT + 2){//現在の位置が数字を超えている場合hideCursor(MAXDIGIT-1); //最後の桁でカーソルを非表示drawSymbol(1); // dn arrow selectIcon(idx-MAXDIGIT、WHITE);を描画します//アイコンを選択}} // ------------------------------------------ -------------------------------------------------- --------------------------------------- //サブモードSINGLEDIGIT:エンコーダプッシュイベント//- -------------------------------------------------- -------------------------------------------------- ------------------------------ if(encoderPush){encoderPush =false; // ------------------------------------------------ -------------------------------------------------- ----------- // 0から5までの数字が選択されている場合は、モードDIGITCHANGEに移動します// ---------------------- -------------------------------------------------- ------------------------------------- if(idx <=MAXDIGIT-1){hideCursor(idx ); //フラッシュカーソルdelay(250); // selectDigit(idx);の場合//視覚的な確認drawSymbol(2); //ターンアイコンモードを描画=DIGITCHANGE; //モードを変更} // ------------------------------------------- -------------------------------------------------- ---------------- //それ以外の場合は、アイコンが選択されているので、オプションに移動します// -------------------- -------------------------------------------------- --------------------------------------- else {if(idx> =MAXDIGIT &&idx <=MAXDIGIT + 2){idy =idx-MAXDIGIT; selectOption(idy); idy =options [idy]; } } } 壊す; //終了モードSINGLEDIGITケースSWEEP:// 2 // ------------------------------------- -------------------------------------------------- ------------------------- //ワークモードSWEEP:エンコーダーの回転でカーソルを左右に移動してオプションを選択します// -------- -------------------------------------------------- -------------------------------------------------- ---- if(encoderSpin){if(encoderSpin ==CW &&idy <2)idy ++; if(encoderSpin ==CCW &&idy> 0)idy--; selectIcon(idy、WHITE); } if(encoderPush){// ------------------------------------------ -------------------------------------------------- --------------------------------------- //ワークモードSWEEP:エンコーダープッシュはオプションに移動し、スイープオプションまたはSTART / STOPスイープ// ----------------------------------------- -------------------------------------------------- ----------------------------------------エンコーダープッシュ=false;スイッチ(idy){ケース0:lFreq =atol(Freq); selectOption(idy); idy =options [idy]; delay(100); if(_WorkMode!=2)displayFrequency(lLastFreq); SweepReset();壊す;ケース1:lFreq =atol(Freq); drawSymbol(9); drawSymbol(1); displaySweepIcons(); selectIcon(0、WHITE); idy =0; displayFrequency(_Sweep(idy)); delay(100); SweepReset();モード=OPTSWEEP;壊す;ケース2:// ** swapStatus:STILL 0(開始されていない)、1 BREAK、2 PAUSE ** if(sweepStatus ==STILL || swapStatus ==PAUSE){drawSymbol(3); //一時停止アイコンを描画しますselectIcon(2、WHITE); //アイコンFrequencySweep();を選択します//スイープを実行} else {//一時停止した場合drawSymbol(4); //再生アイコンを描画しますsweepStatus =PAUSE; } 壊す; }} if(sweepStatus ==PAUSE)flashIcon(250); //一時停止テキストブレークの点滅; //モードの終了SWEEPcase OPTIONS:// 3 if(encoderLongPush)reset(); // ------------------------------------------------ -------------------------------------------------- --------------------------------- //モードオプション:変更するエンコーダスピン選択オプション(ワークモード、ウェーブタイプ、カップリングモード) )// ----------------------------------------------- -------------------------------------------------- ---------------------------------- if(encoderSpin){if(encoderSpin ==CW &&idy <2) idy ++; if(encoderSpin ==CCW &&idy> 0)idy--; selectIcon(idy、WHITE); } // ----------------------------------------------- -------------------------------------------------- ---------------------------------- //モードオプション:エンコーダプッシュスイッチを相対モードに// --- -------------------------------------------------- -------------------------------------------------- ---------------------------- if(encoderPush){encoderPush =false; // selectIcon(idy、BLACK); selectOption(idy); hiddenCursor(0); idy =options [idy]; } 壊す; //終了モードOPTIONSケースOPTMODE:// 4 // ------------------------------------- -------------------------------------------------- -------------------------------------------- //モードOPTMODE:エンコーダースピン選択モードアイコン(対数、1桁、スイープ)// ------------------------------------- -------------------------------------------------- -------------------------------------------- if(encoderSpin){if (encoderSpin ==CW &&idy <2)idy ++; if(encoderSpin ==CCW &&idy> 0)idy--; selectIcon(idy、WHITE); } // ----------------------------------------------- -------------------------------------------------- ---------------------------------- //モードOPTMODE:エンコーダープッシュ選択作業モードを設定します(option [に保存) 0])// ------------------------------------------------- -------------------------------------------------- ------------------------------------ if(encoderPush){encoderPush =false;バイトpMode =_WorkMode; switch(idy){ケース0:hideCursor(0); drawSymbol(0); lFreq =lLastFreq; displayFrequency(lFreq); _setWorkMode(LOGARITHMIC);壊す;ケース1:drawSymbol(0); selectDigit(0); lFreq =lLastFreq; displayFrequency(lFreq); _setWorkMode(SINGLEDIGIT);壊す;ケース2:lLastFreq =lFreq; displayFrequency(_SweepMin); //開始する準備ができました_setWorkMode(SWEEP);壊す; } mode =_WorkMode; if(pMode!=_WorkMode)saveConfig(); if(_CouplingMode ==OFF)resetCouplingMode(); idx =0; drawAllIcons(); } 壊す; //終了モードOPTMODEケースOPTWAVE:// 5 // ------------------------------------- -------------------------------------------------- ------------------------- //モードOPTWAVE:エンコーダーの回転でカーソルを左右に動かして波を選択します(sqr、sin、tri)//- -------------------------------------------------- -------------------------------------------------- ----------- if(encoderSpin){if(encoderSpin ==CW &&idy <2)idy ++; if(encoderSpin ==CCW &&idy> 0)idy--; selectIcon(idy、WHITE); } // ----------------------------------------------- -------------------------------------------------- ------------------- //モードOPTWAVE:エンコーダプッシュセットニューウェーブタイプ// ------------------ -------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - もしも (エンコーダープッシュ){エンコーダープッシュ=false; if(_WaveType!=idy){_ setWaveType(idy); saveConfig(); } UpdateFrequency(); //ウェーブタイプdrawAllIcons();を更新しますidx =0; mode =_WorkMode; } 壊す; //終了モードOPTWAVEケースOPTCOUP:// 6 // ------------------------------------- -------------------------------------------------- ------------------------- //モードOPTCOUP:エンコーダーの回転でカーソルを左右に移動してカップリングモードを選択します// ------- -------------------------------------------------- -------------------------------------------------- ----- if(encoderSpin){if(encoderSpin ==CW &&idy <2)idy ++; if(encoderSpin ==CCW &&idy> 0)idy--; selectIcon(idy、WHITE); } // ----------------------------------------------- -------------------------------------------------- ------------------- //モードOPTCOUP:エンコーダプッシュ選択現在の結合モード// ------------------ -------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - もしも (エンコーダープッシュ){エンコーダープッシュ=false; setCouplingMode(idy); drawAllIcons(); idx =0; mode =_WorkMode; } 壊す; //終了モードOPTCOUPケースOPTSWEEP:// 7 // ------------------------------------- -------------------------------------------------- ----------------------------- //モードOPTSWEEP:エンコーダースピン選択スイープ値を編集します// ------- -------------------------------------------------- -------------------------------------------------- --------- if(encoderSpin){if(encoderSpin ==CW &&idy <2)idy ++; //ポインタを時計回りに増やすif(encoderSpin ==CCW &&idy> 0)idy--; //反時計回りにポインタを減らしますselectIcon(idy、WHITE); //最初のアイコンを選択displayFrequency(_Sweep(idy)); //現在のスイープ値を表示します} if(encoderPush){encoderPush =false; // ------------------------------------------------ -------------------------------------------------- ------------------ //モードOPTSWEEP:エンコーダープッシュ確認スイープ値を編集します// ------------------ -------------------------------------------------- ------------------------------------------------ drawSymbol( 0); selectDigit(0); selectIcon(idy、WHITE); idx =0; displayFrequency(_Sweep(idy));モード=SWEEPEDIT; } 壊す; //終了モードOPTSWEEPケースSWEEPEDIT:// 8 // ------------------------------------- -------------------------------------------------- ----------------------- //モードSWEEPEDIT:変更するエンコーダスピン選択桁// -------------- -------------------------------------------------- ---------------------------------------------- if(encoderSpin) {if(encoderSpin ==CW &&idx  0)idx--; //反時計回りにポインタを減らしますselectDigit(idx); } // ----------------------------------------------- -------------------------------------------------- ------------- //モードSWEEPEDIT:エンコーダーlongpushは編集を終了し、SWEEPに戻ります// --------------------- -------------------------------------------------- --------------------------------------- if(encoderLongPush ==LONGPUSH){encoderPush =false; drawAllIcons(); displayFrequency(_SweepMin); hiddenCursor(idx); _setWorkMode(SWEEP); SweepReset(); mode =_WorkMode; delay(250); } if(encoderPush){encoderPush =false; // ------------------------------------------------ -------------------------------------------------- ----------- //モードSWEEPEDIT:エンコーダープッシュはモードDIGITCHANGEに移動します// -------------------------- -------------------------------------------------- --------------------------------- hiddenCursor(idx); //フラッシュカーソルdelay(250); // selectDigit(idx);の場合//視覚的な確認drawSymbol(2); //ターンアイコンモードを描画=DIGITCHANGE; //モードの変更} break; //終了モードSWEEPEDITcase DIGITCHANGE:// 9 // ------------------------------ -------------------------------------------------- ------------------------- //モードDIGITCHANGE:SWEEPモードの場合、エンコーダーはDIGITCHANGEをlongpush終了します// --------- -------------------------------------------------- ---------------------------------------------- if(encoderLongPush ==LONGPUSH &&_WorkMode ==SWEEP){encoderPush =false; hiddenCursor(idx); drawSymbol(1);モード=OPTSWEEP; delay(250); } // ----------------------------------------------- -------------------------------------------------- -------- //モードDIGITCHANGE:エンコーダ回転変更桁値(0-> 9-> 0など)// ------------------ -------------------------------------------------- ------------------------------------- if(encoderSpin){//エンコーダローテーションif(encoderSpin ==CW){//時計回りの方向Freq [idx] ++; if(Freq [idx]> '9')Freq [idx] ='0'; } else {//反時計回り方向Freq [idx]-; if(Freq [idx] <'0')Freq [idx] ='9'; } updateDigit(idx、Freq [idx]); //ディスプレイ上の数字を更新します} // ----------------------------------------- -------------------------------------------------- -------------- //モードDIGITCHANGE:エンコーダープッシュリターンモードSINGLEDIGITまたはSWEEPEDIT // --------------------- -------------------------------------------------- ---------------------------------- if(encoderPush){//割り込みによって設定されたエンコーダプッシュフラグencoderPush =false; //イベントフラグをリセットしますhideCursor(idx); //フラッシュカーソルdelay(250); // selectDigit(idx);の場合//視覚的な確認drawSymbol(0); if(_WorkMode ==SWEEP){long ltemp =_Sweep(idy); //値を保存します_setSweep(idy、atol(Freq)); //新しい値を配列からlongに変換if(_SweepMax> 0 &&_SweepMax> _SweepMin &&_SweepStep>
 0){//新しいスイープ値の合同性をチェックif(_Sweep(idy)!=ltemp)saveConfig(); //値が変更された場合は、EEPROMに新しい値を書き込みますdisplayFrequency(_Sweep(idy));モード=SWEEPEDIT; //モードを変更} else {_displayErrMsg; // flash mem delay(1000);に保存されているエラーメッセージを表示します。 _setSweep(idy、ltemp); //保存された値を復元しますdisplayFrequency(_Sweep(idy)); //値を再表示しますdrawSymbol(2); //ターンアイコンを再描画します}} else {//スイープモードでない場合if(_CouplingMode ==OFF){//カップリングモードの場合OFF lLastFreq =atol(Freq); //現在の周波数を保存resetCouplingMode(); //デフォルトの結合モードを設定します} UpdateFrequency(); //周波数をDDSモジュールモードに送信=SINGLEDIGIT; //モードを変更}} break; //終了モードDIGITCHANGEデフォルト:break; }} // ---------------------------------------------- -------------------------------------------------- ----------------------------------- //プッシュエンコーダイベント-割り込みによって呼び出されます// ---- -------------------------------------------------- -------------------------------------------------- --------------------------- void encodeSwitch(void){encoderPush =true;} // ---------- -------------------------------------------------- -------------------------------------------------- --------------------- //ユーティリティ機能// ----------------------- -------------------------------------------------- -------------------------------------------------- -------- //グラフィックインターフェイスの描画// ----------------------------------- -------------------------------------------------- --------------------------- void drawInterface(){display.clearDisplay(); display.display(); delay(1000); display.drawRoundRect(0、0、128、64、3、WHITE); //外部フレームを描画しますdisplay.fillRect(1、1、126、14、WHITE); //キャプションフレームを描画しますdisplayText(12、4、strFromFlash(0)、BLACK、WHITE、SMALL); //キャプションタイトルを出力delay(1000); if(cTime ==1){//電源投入時のみdisplayText(XPOS-6、YPOS + 10、strFromFlash(1)、WHITE、BLACK、BIG); //ウェルカムメッセージを表示delay(1000); display.fillRect(2、16、display.width()-3、35、BLACK); //ウェルカムメッセージをクリアしますcTime =0; } display.display(); displayText(XPOS + 84、YPOS + 4、strFromFlash(2)、WHITE、BLACK、SMALL); // "Hz"を出力sprintf(Freq、 "%06li"、lFreq); //頻度値をテンプレート "000000"のchar配列に入れますfor(int i =MAXDIGIT --1; i> =0; i-){display.drawChar(XPOS + 2 + i * DELTAX、YPOS、Freq [i] 、WHITE、BLACK、BIG); //右から左にアニメーション効果で表示しますdisplay.display(); }} // end drawInterface()// ---------------------------------------- -------------------------------------------------- ---------------------- //指定された色とサイズで文字列をx、y位置に出力します// ------------ -------------------------------------------------- -------------------------------------------------- void displayText(byte x、byte y、const char * str、byte foreColor、byte backColor、byte textSize){display.setTextSize(textSize); // textsize:SMALLまたはBIGグローバルconst display.setTextColor(foreColor、backColor); //ライブラリのWHITEまたはBLACKグローバル定数に色を付けますdisplay.setCursor(x、y); //カーソル位置を設定しますdisplay.print(str); // strはcharsの文字列へのポインタdisplay.display(); //表示を更新} // ------------------------------------------- -------------------------------------------------- ------------------- // string_table配列の要素[i]をフラッシュメモリからRAMバッファにコピーし、ポインタをバッファに返します// ---- -------------------------------------------------- -------------------------------------------------- -------- char * strFromFlash(byte i){strcpy_P(buffer、(char *)pgm_read_word(&(string_table [i]))); return(char *)buffer;} // ---------------------------------------- -------------------------------------------------- ---------------------- //前のアイコンの境界線をクリアした後、選択したアイコンの周囲に境界線を描画またはクリアします// --------- -------------------------------------------------- -------------------------------------------------- --- void selectIcon(byte icon、byte color){static byte prevIcon; display.drawRect(XPOS-10 + prevIcon * 32、YPOS + 19、29、20、BLACK); display.drawRect(XPOS-10 +アイコン* 32、YPOS + 19、29、20、色); display.display(); prevIcon =icon;} // ----------------------------------------------------------- -------------------------------------------------- ------------------- //すべての作業モードアイコンを表示します// ----------------------- -------------------------------------------------- --------------------------------------- void displayWorkModeIcons(void){byte const * bitmap [ 3] ={imgLog、imgDigit、imgSweep}; _clearIconsArea; for(byte i =0; i <=2; i ++){display.drawBitmap(XPOS-8 + i * 32、YPOS + 21、bitmap [i]、25、16、WHITE); } display.display();} // ---------------------------------------- -------------------------------------------------- ---------------------- //すべてのウェーブタイプアイコンを表示します// -------------------- -------------------------------------------------- ------------------------------------------ void displayWaveTypeIcons(void){byte const * bitmap [3] ={imgSqr、imgSin、imgTri}; _clearIconsArea; for(byte i =0; i <=2; i ++){display.drawBitmap(XPOS-8 + i * 32、YPOS + 21、bitmap [i]、25、16、WHITE); } display.display();} // ---------------------------------------- -------------------------------------------------- ---------------------- //すべての結合モードアイコンを表示します// ------------------- -------------------------------------------------- ------------------------------------------- void displayCouplingModeIcons(void){バイトconst * bitmap [3] ={imgCoAc、imgCoDc、imgCoOff}; _clearIconsArea; for(byte i =0; i <=2; i ++){display.drawBitmap(XPOS-8 + i * 32、YPOS + 21、bitmap [i]、25、16、WHITE); } display.display();} // ---------------------------------------- -------------------------------------------------- ---------------------- //すべてのスイープアイコンを表示します// -------------------- -------------------------------------------------- ------------------------------------------ void displaySweepIcons(void){byte const * bitmap [3] ={imgSwMax、imgSwMin、imgSwStep}; _clearIconsArea; for(byte i =0; i <=2; i ++){display.drawBitmap(XPOS-8 + i * 32、YPOS + 21、bitmap [i]、25、16、WHITE); } display.display();} // ---------------------------------------- -------------------------------------------------- ---------------------- //すべてのアイコンを描画します// --------------------- -------------------------------------------------- ----------------------------------------- void drawAllIcons(void){_ clearIconsArea; drawModeIcon(); if(_WorkMode ==SWEEP || _WorkMode ==SWEEPEDIT){display.drawBitmap(XPOS + 24、YPOS + 21、imgSwOpt、25、16、WHITE); display.drawBitmap(XPOS + 56、YPOS + 21、imgSwStart、25、16、WHITE); drawSymbol(1); idy =2; selectIcon(idy、WHITE); // drawSmallWaveIcon();をスイープする準備ができましたdrawSmallCouplingIcon(); } else {drawWaveIcon(); drawCouplingIcon(); drawSymbol(0); if(_WorkMode ==SINGLEDIGIT)selectDigit(0); } display.display();}//----------------------------------------------------------------------------------------------------------------// Draws the icon based on the value of relative option//----------------------------------------------------------------------------------------------------------------void drawModeIcon(void) { byte x =XPOS - 8, y =YPOS + 21; byte const *bitmap[3] ={imgLog, imgDigit, imgSweep}; display.fillRect(x, y, 25, 16, BLACK); display.drawBitmap(x, y, bitmap[_WorkMode], 25, 16, WHITE); display.display();}void drawWaveIcon(void) { byte x =XPOS + 24, y =YPOS + 21; const byte *bitmap[3] ={imgSqr, imgSin, imgTri}; display.fillRect(x, y, 25, 16, BLACK); display.drawBitmap(x, y, bitmap[_WaveType], 25, 16, WHITE); display.display(); drawSmallWaveIcon();}void drawCouplingIcon(void) { byte x =XPOS + 56, y =YPOS + 21; const byte *bitmap[3] ={imgCoAc, imgCoDc, imgCoOff}; display.fillRect(x, y, 25, 16, BLACK); display.drawBitmap(x, y, bitmap[_CouplingMode], 25, 16, WHITE); display.display(); drawSmallCouplingIcon();}//----------------------------------------------------------------------------------------------------------------// Draws small wave icon based on the value of relative option//----------------------------------------------------------------------------------------------------------------void drawSmallWaveIcon(void) { byte x =114, y =41; const byte *bitmap[3] ={imgSqrSmall, imgSinSmall, imgTriSmall}; display.fillRect(x, y, 9, 8, BLACK); display.drawBitmap(x, y, bitmap[_WaveType], 9, 8, WHITE); display.display();}//----------------------------------------------------------------------------------------------------------------// Draws small coupling icon based on the value of relative option//----------------------------------------------------------------------------------------------------------------void drawSmallCouplingIcon(void) { byte x =114, y =50; const byte *bitmap[3] ={imgAcSmall, imgDcSmall, imgOffSmall}; display.fillRect(x, y, 9, 8, BLACK); display.drawBitmap(x, y, bitmap[_CouplingMode], 9, 8, WHITE); display.display();}//----------------------------------------------------------------------------------------------------------------// Show cursor at x position//----------------------------------------------------------------------------------------------------------------void showCursor(byte x) { display.drawChar(XPOS + 2 + x * DELTAX, YPOS + DELTAY, CURSOR, WHITE, WHITE, BIG); display.display();}//----------------------------------------------------------------------------------------------------------------// Hide cursor at x position//----------------------------------------------------------------------------------------------------------------void hideCursor(byte x) { display.drawChar(XPOS + 2 + x * DELTAX, YPOS + DELTAY, CURSOR, BLACK, BLACK, BIG); display.display();}//----------------------------------------------------------------------------------------------------------------// Show cursor at x position after hiding previous one//----------------------------------------------------------------------------------------------------------------void selectDigit(byte x) { static byte lastDigit; hideCursor(lastDigit); display.drawChar(XPOS + 2 + x * DELTAX, YPOS + DELTAY, CURSOR, WHITE, WHITE, BIG); display.display(); lastDigit =x;}//----------------------------------------------------------------------------------------------------------------// Update single digit frequency to chr value//----------------------------------------------------------------------------------------------------------------void updateDigit(byte digit, char chr) { display.drawChar(XPOS + 2 + digit * DELTAX, YPOS, chr , WHITE, BLACK, BIG); display.display();}//----------------------------------------------------------------------------------------------------------------// Drwaw or clear some symbols/icons//----------------------------------------------------------------------------------------------------------------void drawSymbol(byte symbol) { switch (symbol) { case 0://Top arrow display.fillRect(2, 20, 25, 16, BLACK); display.fillRect(2, 43, 14, 16, BLACK); display.drawChar(XPOS - 20 , YPOS + 4, ARROW, WHITE, BLACK, SMALL); //draw top arrow top break; case 1://Bottom arrow display.fillRect(2, 20, 25, 16, BLACK); display.fillRect(2, 43, 14, 16, BLACK); display.drawChar(XPOS - 20 , YPOS + 25, ARROW, WHITE, BLACK, SMALL); //draw bottom arrow break; case 2://Turn icon display.fillRect(2, 20, 25, 16, BLACK); display.drawBitmap(XPOS - 21, YPOS + 1, imgTurn, 13, 13, WHITE); //draw turn icon break; case 3://Play icons display.fillRect(4, 23, 23, 11, BLACK); //clear pause icon display.drawBitmap(4, 23, imgSwRun, 23, 11, WHITE); //draw sweep icon display.fillRect(XPOS + 56, YPOS + 21, 25, 16, BLACK); //clear icon area display.drawBitmap(XPOS + 56, YPOS + 21, imgSwPause, 25, 16, WHITE); //drwaw sweep play symbol icon break; case 4://Pause icons display.fillRect(4, 23, 23, 11, BLACK); //clear sweep icon display.drawBitmap(4, 23, imgSwPsd, 23, 11, WHITE); //draw pause icon display.fillRect(XPOS + 56, YPOS + 21, 25, 16, BLACK); //clear icon area display.drawBitmap(XPOS + 56, YPOS + 21, imgSwStart, 25, 16, WHITE); //draw sweep pause symbol icon break; case 9://Simply clear symbol area display.fillRect(2, 20, 25, 16, BLACK); //clear top symbol area display.fillRect(2, 43, 14, 16, BLACK); //clear bottom symbol area break; default:break; } display.display();}//---------------------------------------------------------------------------------------------------------------// Set current frequency in DDS module, if frequency is 0 it will be set to 1//---------------------------------------------------------------------------------------------------------------void UpdateFrequency(void) { lFreq =atol(Freq); //convert char array to long if (lFreq <1) { //the frequency at zero makes no sense ++Freq[MAXDIGIT - 1]; //increase the right most digit lFreq =1; //set frequency to 1 } displayFrequency(lFreq); //update the display DDS_FrequencySet(lFreq, Wave[_WaveType]); //send the frequency value to DDS module lLastFreq =lFreq; //save current freq}//---------------------------------------------------------------------------------------------------------------// Display the frequency with the six-zero template//---------------------------------------------------------------------------------------------------------------void displayFrequency(long f) { sprintf(Freq, "%06li", f); //convert long to char with template '000000' displayText(XPOS + 2, YPOS, Freq , WHITE, BLACK, BIG); //print frequency on display display.display(); //refresh display}//---------------------------------------------------------------------------------------------------------------// Reset coupling mode to default//---------------------------------------------------------------------------------------------------------------void resetCouplingMode(void) { if (lFreq ==0 &&_CouplingMode ==OFF) { setCouplingMode(AC); drawCouplingIcon(); }}//---------------------------------------------------------------------------------------------------------------// Set a specific coupling mode//---------------------------------------------------------------------------------------------------------------void setCouplingMode(byte cMode) { byte pMode =_CouplingMode; switch (cMode) { case 0:if (lLastFreq> 0) lFreq =lLastFreq; digitalWrite(PinCoupling, LOW); _setCouplingMode(AC);壊す; case 1:if (lLastFreq> 0) lFreq =lLastFreq; digitalWrite(PinCoupling, HIGH); _setCouplingMode(DC);壊す; case 2:lLastFreq =lFreq; lFreq =0; digitalWrite(PinCoupling, LOW); _setCouplingMode(OFF);壊す; } DDS_FrequencySet(lFreq, Wave[_WaveType]); displayFrequency(lFreq); if (cMode !=pMode) saveConfig();}//---------------------------------------------------------------------------------------------------------------// Select options//---------------------------------------------------------------------------------------------------------------void selectOption(byte opt) { selectIcon(opt, BLACK); switch (opt) { case 0://workMode; displayWorkModeIcons(); selectIcon(_WorkMode, WHITE); mode =OPTMODE;壊す; case 1://waveType; displayWaveTypeIcons(); selectIcon(_WaveType, WHITE); mode =OPTWAVE;壊す; case 2://couplingMode; displayCouplingModeIcons(); selectIcon(_CouplingMode, WHITE); mode =OPTCOUP;壊す; }}//----------------------------------------------------------------------------------------------------------------// Calculate logarithmic steps of the frequency//----------------------------------------------------------------------------------------------------------------long AutoStep(long value, byte spin) { if (spin ==CW) { if (value>=100000) return 100000; if (value>=10000) return 10000; if (value>=1000) return 1000; if (value>=100) return 100; if (value>=10) return 10; if (value>=1) return 1; 0を返します。 // Invalid value } else { if (value <=10) return 1; if (value <=100) return 10; if (value <=1000) return 100; if (value <=10000) return 1000; if (value <=100000) return 10000; if (value <=1000000) return 100000; 0を返します。 // Invalid value }}//-------------------------------------------------------------------------------------------// Start Sweep or restart it from where it came from before the pause//-------------------------------------------------------------------------------------------void FrequencySweep() { do { if (sweepDnPausedVal ==0) { //if sweepDown has not been stopped if (sweepUpPausedVal> 0) { //and sweepUp has been stopped sweepUpPausedVal =SweepUp(sweepUpPausedVal); //continues from current value } else { sweepUpPausedVal =SweepUp(_SweepMin); //else start from min } } if (sweepStatus !=BREAK) { //if sweep has been stopped if (sweepDnPausedVal> 0) { //and sweepDn has been stopped sweepDnPausedVal =SweepDn(sweepDnPausedVal); //continues from current value } else { sweepDnPausedVal =SweepDn(_SweepMax); //else start from max } } } while (sweepStatus !=BREAK); //continues sweep until stopped}//-----------------------------------------------------------------------------------------// Sweep Up from sweepmin push encoder to pause//-----------------------------------------------------------------------------------------long SweepUp(long sweepmin) { long f; for (f =sweepmin; f <_SweepMax; f +=_SweepStep) { DDS_FrequencySet(f, Wave[_WaveType]); displayFrequency(f); if (encoderPush) { sweepStatus =BREAK;壊す; } } if (sweepStatus ==BREAK) return f; return 0;}//-----------------------------------------------------------------------------------------// Sweep down from sweepmax push encoder to pause//-----------------------------------------------------------------------------------------long SweepDn(long sweepmax) { long f; for (f =sweepmax; f> _SweepMin; f -=_SweepStep) { DDS_FrequencySet(f, Wave[_WaveType]); displayFrequency(f); if (encoderPush) { sweepStatus =BREAK;壊す; } } if (sweepStatus ==BREAK)return f; return 0;}//-----------------------------------------------------------------------------------------// Clear global sweep vars and restore display//-----------------------------------------------------------------------------------------void SweepReset(void) { sweepStatus =STILL; sweepUpPausedVal =0; sweepDnPausedVal =0; display.fillRect(4, 23, 23, 11, BLACK); //clear sweep text display.display();}//-----------------------------------------------------------------------------------------// Flash sweep pause icon//-----------------------------------------------------------------------------------------void flashIcon(int interval) { static long previousMillis; static boolean picShow; if (millis() - previousMillis>=interval) { previousMillis =millis(); picShow =!picShow; if (picShow) { display.drawBitmap(4, 23, imgSwPsd, 23, 11, WHITE); //drwaw sweep pause icon display.display(); } else { display.fillRect(4, 23, 23, 11, BLACK); //clear sweep pause icon display.display(); } }}//-----------------------------------------------------------------------------------------// Arduino software reset//-----------------------------------------------------------------------------------------void reset(void) { display.fillRect(1, 16, 125, 46, BLACK); display.display(); displayText(30, 30, strFromFlash(4), WHITE, BLACK, BIG); char str[2]; for (byte i =3; i> 0; i--) { sprintf(str, "%d", i); displayText(95, 30, str, WHITE, BLACK, BIG);...This file has been truncated, please download it to see its full contents.
JXWG_Defs.hC/C++
Declarections section
// This file is an integral part of the JX_WaveGenerator.ino and must be// distributed together with the main file to allow it to function correctly.// The same license of the main file applies to this file.// Janux 01/04/2021 on Turin, Italy.#ifndef JXWG_Defs#define JXWG_Defs#include #include //Encoder library, see https://www.arduino.cc/reference/en/libraries/simplerotary/#include  // //adaptation of the library for SSD1306 to the SH1106 display, see https://github.com/wonho-maker/Adafruit_SH1106#include #define DEBUG 0#define OLED_RESET -1Adafruit_SH1106 display(OLED_RESET);#define PinA 5 //Encoder pin A#define PinB 4 //Encoder pin B #define PinS 3 //Encoder pin SwitchSimpleRotary Encoder(PinA, PinB, PinS);//list of loop mode#define LOGARITHMIC 0 //+workmode#define SINGLEDIGIT 1 //+workmode#define SWEEP 2 //+workmode#define OPTIONS 3 //-submode of LOGARITHMIC and SINGLEDIGIT#define OPTMODE 4 //-submode of OPTIONS#define OPTWAVE 5 //-submode of OPTIONS#define OPTCOUP 6 //-submode of OPTIONS#define OPTSWEEP 7 //-submode of SWEEP#define SWEEPEDIT 8 //-submode of OPTSWEEP#define DIGITCHANGE 9 //-submode of SINGLEDIGIT and SWEEPEDIT#define PinCoupling 7 //Coupling mode pin (relay pin)//constants #define XPOS 28#define YPOS 21#define DELTAX 12#define DELTAY 4#define SMALL 1#define BIG 2#define CW 1#define CCW 2#define PUSH 1#define LONGPUSH 1//Num Freq digit#define MAXDIGIT 6//Wave type#define SQUARE 0#define SINE 1#define TRIANGLE 2//Coupling mode#define AC 0#define DC 1#define OFF 2//Sweep status#define STILL 0#define BREAK 1#define PAUSE 2//Symbols chars#define CURSOR 0x5F#define ARROW 0x10//AD9833 module Pin connection#define DDS_FSY 9#define DDS_CLK 10#define DDS_DAT 11//AD9833 Wave Type const#define wSquare 0x28#define wSine 0x00#define wTriangle 0x02//-----------------------------------------------------------------------------// Variables declarections //-----------------------------------------------------------------------------//Strings constants placed in flash memory save ram spaceconst char str1[] PROGMEM ="JX WAVE GENERATOR"; // 18 byteconst char str2[] PROGMEM ="WELCOME"; // 8 byteconst char str3[] PROGMEM ="Hz"; // 3 byteconst char str4[] PROGMEM ="ERROR!"; // 7 byteconst char str5[] PROGMEM ="RESET"; // 6 byte //42 byte totalconst char* const string_table[] PROGMEM ={str1, str2, str3, str4, str5};char buffer[18]; //local buffer for string, make sure this is large enough for the largest string it must holdlong lFreq =1000; //main frequency variablelong lLastFreq =1000; //used to save the current freq value in some situationslong sweepUpPausedVal =0; //value of sweep when pusedlong sweepDnPausedVal =0; //value of sweep when pusedlong lSweep[3] ={20000, 0, 100}; //Sweep Hz default value MAX, MIN, STEP;byte sweepStatus =STILL; //current status of the sweep processconst byte Wave[] ={wSquare, wSine, wTriangle}; //array for WaveTypevolatile boolean encoderPush =false; //var used in the routine called by interruptchar Freq[MAXDIGIT + 1]; //array for display frequency in 6 digit template "000000"byte mode =0; //current loop modebyte idx =0; //pointer to digit index (0 to 5)byte idy =0; //same of idx in submodelong cTime =1; //screensaver counter//default startup preferencesbyte options[3] ={LOGARITHMIC, SINE, DC}; //mode, wavetype, couplingmode//define others macros#define _WorkMode options[0]#define _setWorkMode(x) options[0]=x#define _WaveType options[1]#define _setWaveType(x) options[1]=x#define _CouplingMode options[2]#define _setCouplingMode(x) options[2]=x#define _reservedbyte 0xFF#define _SweepMax lSweep[0]#define _SweepMin lSweep[1]#define _SweepStep lSweep[2]#define _Sweep(x) lSweep[x]#define _setSweep(x,f) lSweep[x]=f#define _setSweepMax(x) lSweep[0]=x#define _setSweepMin(x) lSweep[1]=x#define _setSweepStep(x) lSweep[2]=x//define short functions macros#define _clearIconsArea display.fillRect(XPOS - 11, YPOS + 18, 94, 24, BLACK)#define _displayErrMsg displayText(XPOS + 2, YPOS, strFromFlash(3), WHITE, BLACK, BIG);//define CONFIG consts &vars #define CONFIG_START 32 //EEPROM Memory start location#define CONFIG_VERSION "JXWG1" //Config version ID//define custom type structtypedef struct { char version[6]; byte workmode; byte wavetype; byte couplingmode; byte reservedbyte; long sweepmax; long sweepmin; long sweepstep;} config_type;//create new struct and load it with default valueconfig_type CONFIG ={ CONFIG_VERSION, _WorkMode, _WaveType, _CouplingMode, _reservedbyte, _SweepMax, _SweepMin, _SweepStep,};//define processor reset functionvoid(*ATmegaReset)(void) =0;#endif
JXWG_Graphics.hC/C++
Icon resource data file
// This file is an integral part of the JX_WaveGenerator.ino and must be// distributed together with the main file to allow it to function correctly.// The same license of the main file applies to this file.// Janux 01/04/2021 on Turin, Italy.#ifndef JXWG_Graphics#define JXWG_Graphics//----------------------------------------------------------------------------------------------// Plain b&w bitmaps PROGMEM icons data//----------------------------------------------------------------------------------------------const byte imgLog[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x88, 0x00, 0x40, 0x80, 0x9c, 0x00, 0x40, 0x80, 0x88, 0x00, 0x80, 0x80, 0x88, 0x00, 0x80, 0x80, 0x88, 0x01, 0x00, 0x80, 0x88, 0x02, 0x00, 0x80, 0x88, 0x0c, 0x00, 0x80, 0x88, 0x30, 0x00, 0x80, 0x89, 0xc0, 0x00, 0x80, 0x8e, 0x00, 0x10, 0x80, 0x9f, 0xff, 0xf8, 0x80, 0x88, 0x00, 0x10, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgDigit[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x9c, 0x47, 0x3e, 0x80, 0xa2, 0xc8, 0x82, 0x80, 0xa6, 0x40, 0x84, 0x80, 0xaa, 0x47, 0x0c, 0x80, 0xb2, 0x48, 0x02, 0x80, 0xa2, 0x48, 0x22, 0x80, 0x9c, 0xef, 0x9c, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x3e, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSweep[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x8f, 0xcf, 0x38, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0x88, 0x49, 0x28, 0x80, 0xb8, 0x79, 0xee, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSqr[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x82, 0x08, 0x20, 0x80, 0x80, 0xff, 0x80, 0x80, 0x82, 0x88, 0xa0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, 0x88, 0xa0, 0x80, 0x80, 0x80, 0x80, 0x80, 0xaa, 0xaa, 0xaa, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, 0x88, 0xa0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, 0x88, 0xa0, 0x80, 0xff, 0x80, 0xff, 0x80, 0x82, 0x08, 0x20, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSin[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x82, 0x08, 0x20, 0x80, 0x80, 0x1c, 0x00, 0x80, 0x82, 0x2a, 0x20, 0x80, 0x80, 0x41, 0x00, 0x80, 0x82, 0x49, 0x20, 0x80, 0x80, 0x80, 0x80, 0x80, 0xaa, 0xaa, 0xaa, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc3, 0x08, 0x61, 0x80, 0xc1, 0x00, 0x41, 0x80, 0xa2, 0x08, 0x22, 0x80, 0x9c, 0x00, 0x1c, 0x80, 0x82, 0x08, 0x20, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgTri[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x82, 0x08, 0x20, 0x80, 0x82, 0x00, 0x20, 0x80, 0x87, 0x08, 0x70, 0x80, 0x85, 0x00, 0x50, 0x80, 0x8a, 0x88, 0xa8, 0x80, 0x88, 0x80, 0x88, 0x80, 0xba, 0xeb, 0xae, 0x80, 0x90, 0x41, 0x04, 0x80, 0xa2, 0x2a, 0x22, 0x80, 0xa0, 0x22, 0x02, 0x80, 0xc2, 0x1c, 0x21, 0x80, 0xc0, 0x14, 0x01, 0x80, 0x82, 0x08, 0x20, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgCoAc[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x9c, 0x70, 0x00, 0x80, 0xa2, 0x88, 0x00, 0x80, 0xa2, 0x80, 0xc0, 0x80, 0xa2, 0x81, 0x24, 0x80, 0xbe, 0x81, 0x24, 0x80, 0xa2, 0x88, 0x18, 0x80, 0xa2, 0x70, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgCoDc[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xbc, 0x70, 0x00, 0x80, 0xa2, 0x88, 0x00, 0x80, 0xa2, 0x81, 0x54, 0x80, 0xa2, 0x80, 0x00, 0x80, 0xa2, 0x81, 0xfc, 0x80, 0xa2, 0x88, 0x00, 0x80, 0xbc, 0x70, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgCoOff[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x9c, 0xf7, 0x80, 0x80, 0xa2, 0x84, 0x22, 0x80, 0xa2, 0x84, 0x14, 0x80, 0xa2, 0xe7, 0x08, 0x80, 0xa2, 0x84, 0x14, 0x80, 0xa2, 0x84, 0x22, 0x80, 0x9c, 0x84, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSwMax[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x81, 0x00, 0x00, 0x80, 0x82, 0x00, 0x00, 0x80, 0x87, 0x01, 0x00, 0x80, 0x82, 0x03, 0x80, 0x80, 0x82, 0x07, 0xc0, 0x80, 0x82, 0x0f, 0xe0, 0x80, 0x82, 0x1f, 0xf0, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSwMin[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x81, 0x00, 0x00, 0x80, 0x82, 0x00, 0x00, 0x80, 0x87, 0x1f, 0xf0, 0x80, 0x82, 0x0f, 0xe0, 0x80, 0x82, 0x07, 0xc0, 0x80, 0x82, 0x03, 0x80, 0x80, 0x82, 0x01, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSwOpt[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x84, 0x08, 0x10, 0x80, 0x88, 0x1c, 0x38, 0x80, 0x9c, 0x3e, 0x10, 0x80, 0x88, 0x00, 0x00, 0x80, 0x88, 0x00, 0x00, 0x80, 0x88, 0x3e, 0x00, 0x80, 0x88, 0x1c, 0x38, 0x80, 0x88, 0x08, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSwStep[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x84, 0x08, 0x04, 0x80, 0x88, 0x0c, 0x08, 0x80, 0x9c, 0x7e, 0x1c, 0x80, 0x88, 0x7f, 0x08, 0x80, 0x88, 0x7e, 0x08, 0x80, 0x88, 0x0c, 0x08, 0x80, 0x88, 0x08, 0x08, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSwStart[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x00, 0x80, 0x80, 0xf0, 0x00, 0x80, 0x80, 0xfc, 0x00, 0x80, 0x80, 0xff, 0x00, 0x80, 0x80, 0xff, 0xc0, 0x80, 0x80, 0xff, 0xc0, 0x80, 0x80, 0xff, 0x00, 0x80, 0x80, 0xfc, 0x00, 0x80, 0x80, 0xf0, 0x00, 0x80, 0x80, 0xc0, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgSwPause[] PROGMEM ={ 0xff, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x81, 0xe3, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x80};const byte imgTurn[] PROGMEM ={ 0x0f, 0x80, 0x30, 0x60, 0x47, 0x10, 0x58, 0xd0, 0x90, 0x48, 0x80, 0xe8, 0x90, 0x48, 0xb8, 0x08, 0x90, 0x48, 0x58, 0xd0, 0x47, 0x10, 0x30, 0x60, 0x0f, 0x80};const byte imgSwRun[] PROGMEM ={ 0x00, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x9b, 0xa2, 0x22, 0x6b, 0xae, 0xec, 0x7b, 0xae, 0xec, 0x9a, 0xa6, 0x62, 0xea, 0xae, 0xee, 0x6a, 0xae, 0xee, 0x9c, 0x62, 0x2e, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00};const byte imgSwPsd[] PROGMEM ={ 0x00, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x1c, 0xdb, 0x30, 0x6b, 0x5a, 0xd6, 0x6b, 0x5a, 0xf6, 0x18, 0x5b, 0x32, 0x7b, 0x5b, 0xd6, 0x7b, 0x5a, 0xd6, 0x7b, 0x67, 0x30, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00};//Small icons ---------------------------------------------------------------------------------const byte imgSqrSmall[] PROGMEM ={ 0x00, 0x00, 0x3e, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0xe3, 0x80, 0x00, 0x00};const byte imgSinSmall[] PROGMEM ={ 0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x84, 0x80, 0x84, 0x80, 0x03, 0x00, 0x00, 0x00};const byte imgTriSmall[] PROGMEM ={ 0x00, 0x00, 0x20, 0x00, 0x50, 0x00, 0x88, 0x80, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00};const byte imgAcSmall[] PROGMEM ={ 0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x84, 0x80, 0x84, 0x80, 0x03, 0x00, 0x00, 0x00};const byte imgDcSmall[] PROGMEM ={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00};const byte imgOffSmall[] PROGMEM ={ 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x14, 0x00, 0x08, 0x00, 0x14, 0x00, 0x22, 0x00, 0x00, 0x00};//Total program memory space used by icons data:1148 byte#endif

回路図

Display type updated

製造プロセス

  1. Arduinoで水滴をキャプチャする
  2. Arduino Spybot
  3. FlickMote
  4. 自家製テレビB-Gone
  5. マスタークロック
  6. Find Me
  7. Arduino Power
  8. DIYバーチャルリアリティスケートボード
  9. ArduinoMegaをNEO-6MGPSモジュールとインターフェースする方法
  10. Tech-TicTacToe
  11. Arduino Quadruped