Manufaturação industrial
Internet das coisas industrial | Materiais industriais | Manutenção e reparo de equipamentos | Programação industrial |
home  MfgRobots >> Manufaturação industrial >  >> Manufacturing Technology >> Processo de manufatura

JX Wave Generator

Componentes e suprimentos

Arduino Nano R3
Eu não tentei, mas provavelmente você pode usar qualquer modelo Arduino
× 1
Exibir SH1106 I2C Oled 128x64 pixel (4 pinos)
× 1
Módulo AD9833 DDS
× 1
Codificador rotativo com botão de pressão
Com isso, você precisa do ferro de solda
× 1
Módulo Codificador Rotativo
Para montagem em placa de ensaio, é melhor
× 1
Módulo de relé 5V (opcional)
Opcional, se não houver necessidade de alterar o modo de acoplamento de saída AC / DC. é melhor
× 1
Relé Reed 5V 500 Ohm
Isso seria melhor para um sinal pequeno, mas requer o ferro de solda. Com uma bobina de 500 ohms, pode ser conectado diretamente aos pinos digitais do Arduino (10 mA).
× 1
Capacitor 10 µF
× 1
Capacitor 10 nF
Capacitor de poliéster
× 1
Fonte de alimentação abaixador AC-DC 100-220V a 5V módulo
Opcional, para alimentar o circuito quando não estiver conectado via USB
× 1

Ferramentas e máquinas necessárias

Ferro de soldar (genérico)
Não é essencial se você deseja testar o projeto em um breadboard

Aplicativos e serviços online

image2cpp
Para converter seus ícones personalizados em formato hexadecimal para PROGMEM

Sobre este projeto


Por muito tempo adiei a compra de um osciloscópio. Agora, depois de comprá-lo, é hora de ter também um gerador de sinais de baixo custo para uso em hobby, essencial para diagnosticar circuitos de áudio e muito mais. Combinando as duas paixões por eletrônica e computação, o melhor é fazer você mesmo com o Arduino.





RECURSOS

  • Frequência de saída entre 1 Hz e 999999 Hz
  • dois modos de variação de frequência:logarítmico e dígito único
  • três tipos de onda, seno, triangular e quadrada
  • Acoplamento de saída AC ou DC
  • capacidade de varrer continuamente entre dois valores de frequência predefinidos
  • controlado exclusivamente por um único botão
  • protetor de tela integrado para preservar a vida útil do display OLED





NOTA





REFERÊNCIAS RÁPIDAS





PROTÓTIPO


Usei um módulo de relé pré-montado que tem contatos de 10A, pois no momento não tinha um relé micro reed, essa seria a melhor escolha para evitar diodos transistores e resistor, quando não são necessários relés de potência. Um PIN digital Arduino pode fornecer um máximo de 40 mA, portanto, você não pode conectar um relé eletromecânico com uma bobina de 120/150 ohm diretamente.

SEMPRE TENHA MUITO CUIDADO ao usar tensão de rede!

Risco de choque elétrico e / ou danos à pele e aos olhos.
Cuide da sua vida, você só tem uma!

Código

  • JX_Wave_Generator_8.7.7.ino
  • JXWG_Defs.h
  • JXWG_Graphics.h
JX_Wave_Generator_8.7.7.ino C / C ++
Versão 8.7.7. Revisão secundária em 16/01/2021
 / * Copyright (c) 2020 Janux A permissão é concedida, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software e arquivos de documentação associados (o "Software"), para negociar no Software sem restrição, incluindo, sem limitação, os direitos de usar, copiar, modificar, mesclar, publicar, distribuir, sublicenciar e / ou vender cópias do Software, e permitir que as pessoas a quem o Software é fornecido o façam, sujeito às seguintes condições:O aviso de copyright acima e este aviso de permissão devem ser incluídos em todas as cópias ou partes substanciais do Software. O SOFTWARE É FORNECIDO "NO ESTADO EM QUE SE ENCONTRA", SEM QUALQUER TIPO DE GARANTIA, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UM DETERMINADO FIM E NÃO VIOLAÇÃO. EM NENHUMA HIPÓTESE OS AUTORES OU TITULARES DOS DIREITOS AUTORAIS SERÃO RESPONSÁVEIS POR QUALQUER RECLAMAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA EM UMA AÇÃO DE CONTRATO, DELITO OU DE OUTRA FORMA, DECORRENTE DE, FORA DE OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTRAS NEGOCIAÇÕES NO PROGRAMAS. O código de salvamento-carregamento de configuração é um desenvolvimento de uma ideia original do artigo "Como carregar e salvar configurações em um Arduino" por Ragnar Ranyen Homb no site Norwegian Creation. * / # Include "JXWG_Defs.h" #include "JXWG_Graphics .h "void setup () {// se você estiver usando um codificador simples e resistores pullup 3x10K, aplique essas configurações abaixo de pinMode (PinA, INPUT); pinMode (PinB, INPUT); pinMode (PinS, INPUT); // se você estiver usando um codificador simples sem resistores de 3x10K, use a próxima linha da árvore // pinMode (PinA, INPUT_PULLUP); // pinMode (PinB, INPUT_PULLUP); // pinMode (PinS, INPUT_PULLUP); // A MAIORIA DOS CODIFICADORES SOLDADOS DE PCB JÁ POSSUEM RESISTORES DE PULLUP NO PINO AEB, MAS NÃO NO PINO INTERRUPTOR // então use as configurações abaixo // pinMode (PinA, INPUT); // pinMode (PinB, INPUT); // pinMode (PinS, INPUT_PULLUP); digitalWrite (PinA, HIGH); digitalWrite (PinB, HIGH); digitalWrite (PinS, HIGH); pinMode (PinCoupling, OUTPUT); // Modo de acoplamento Encoder.setDebounceDelay (5); display.begin (SH1106_SWITCHCAPVCC, 0x3C); // inicializar com o addr I2C 0x3C (para 128x64) display.clearDisplay (); //display.setRotation(2); // descomente esta linha se quiser montar a tela de cabeça para baixo Wire.begin (); // junta-se ao barramento i2c como mestre TWBR =5; // freq =615kHz period =1.625uS // Atribui o evento push da chave do codificador para interromper 1 pino 3 do Arduino attachInterrupt (digitalPinToInterrupt (PinS), encoderSwitch, FALLING); DDS_Init (); // Inicializa o módulo DDS; setConfig (); // Carregar configuração e definir valores de inicialização} // ---> end setup () void loop () {JX_WaveGenerator_MAIN ();} // ------------------- -------------------------------------------------- -------------------------------------------------- ------------------ // Função JX WaveGenerator PRINCIPAL // ------------------------ -------------------------------------------------- -------------------------------------------------- ------------- void JX_WaveGenerator_MAIN () {byte encoderSpin =Encoder.rotate (); // Sentido de rotação do codificador 1 =CW, 2 =Byte CCW encoderLongPush =Encoder.pushLong (1000); // evento de push longo do codificador long lStep =0; // valor do passo de frequência atual long wTime =600000; // 10 min if (encoderPush) delay (250); if (encoderSpin) {cTime =millis (); } else {if (millis () - cTime> wTime) {ScreenSaver (); }} switch (mode) {case LOGARITHMIC:// 0 // ----------------------------------- -------------------------------------------------- ---------------------------------------------- // modo LOGARÍMICO :A rotação do codificador muda a frequência na etapa logarítmica 1,10,100,1000,10000,100000 Hz // ------------------------------ -------------------------------------------------- -------------------------------------------------- - if (encoderSpin) {if (lFreq> =1) {lStep =AutoStep (lFreq, encoderSpin); // Calcula a etapa logarítmica} else if (_CouplingMode ==OFF) {// se o modo de acoplamento está definido como OFF resetCouplingMode (); // define o modo de acoplamento padrão quando a frequência não é 0 encoderSpin =0; // pula o primeiro giro} if (encoderSpin ==CW &&lFreq <=999999 - lStep) {// giro CW incrementa a frequência lFreq + =lStep; } if (encoderSpin ==CCW &&lFreq> =lStep + 1) {// spin CCW decrementa a frequência lFreq - =lStep; } DDS_FrequencySet (lFreq, Wave [_WaveType]); // envia o valor da frequência para o módulo DDS displayFrequency (lFreq); // envia freq formatado para exibir lLastFreq =lFreq; // salvar freq atual} // ------------------------------------------ -------------------------------------------------- --------------------------------------- // workmode LOGARITHMIC:chave do codificador para o modo OPTIONS // ------------------------------------------------ -------------------------------------------------- --------------------------------- if (encoderPush) {encoderPush =false; // Limpar sinalizador push drawSymbol (1); // desenha o símbolo de seta selectIcon (0, WHITE); // desenha uma borda ao redor do primeiro ícone idx =0; idy =0; // redefine os ponteiros var mode =OPTIONS; // vai para o modo OPÇÕES} break; // end mode LOGARITHMIC case SINGLEDIGIT:// 1 // ------------------------------------- -------------------------------------------------- ---------------------- // submodo SINGLEDIGIT:A rotação do codificador move o cursor para a esquerda e para a direita // -------------- -------------------------------------------------- --------------------------------------------- if (encoderSpin) { if (encoderSpin ==CW &&idx  0) idx--; // ponteiro de diminuição no sentido anti-horário // ------------------------------------------- -------------------------------------------------- --------------- // quando idx é de 0 a 5, selecione dígitos de frequência // --------------------- -------------------------------------------------- ------------------------------------- if (idx> =0 &&idx  =MAXDIGIT &&idx <=MAXDIGIT + 2) {// se a posição atual está além dos dígitos hideCursor (MAXDIGIT - 1); // oculta o cursor no último dígito drawSymbol (1); // desenhar seta dn selectIcon (idx - MAXDIGIT, WHITE); // selecione o ícone}} // ------------------------------------------ -------------------------------------------------- --------------------------------------- // submodo SINGLEDIGIT:Evento de push do codificador // - -------------------------------------------------- -------------------------------------------------- ------------------------------ if (encoderPush) {encoderPush =false; // ------------------------------------------------ -------------------------------------------------- ----------- // se um dígito de 0 a 5 for selecionado, vá para o modo DIGITCHANGE // ---------------------- -------------------------------------------------- ------------------------------------- if (idx <=MAXDIGIT - 1) {ocultarCursor (idx ); // flash cursor delay (250); // para selectDigit (idx); // confirmação visual drawSymbol (2); // desenhar ícone de curva mode =DIGITCHANGE; // mude o modo} // ------------------------------------------- -------------------------------------------------- ---------------- // caso contrário, há um ícone selecionado e vá para OPÇÕES // -------------------- -------------------------------------------------- --------------------------------------- else {if (idx> =MAXDIGIT &&idx <=MAXDIGIT + 2) {idy =idx - MAXDIGIT; selectOption (idy); idy =opções [idy]; } } } pausa; // modo final SINGLEDIGIT case SWEEP:// 2 // ------------------------------------- -------------------------------------------------- ------------------------- // workmode SWEEP:A rotação do codificador move o cursor para a esquerda e para a direita para a seleção da opção // -------- -------------------------------------------------- -------------------------------------------------- ---- if (encoderSpin) {if (encoderSpin ==CW &&idy <2) idy ++; if (encoderSpin ==CCW &&idy> 0) idy--; selectIcon (idy, BRANCO); } if (encoderPush) {// ------------------------------------------ -------------------------------------------------- --------------------------------------- // workmode SWEEP:Encoder push vá para OPTIONS, OPÇÕES DE VARREDURA ou START / STOP varrer // ----------------------------------------- -------------------------------------------------- ---------------------------------------- encoderPush =false; switch (idy) {case 0:lFreq =atol (Freq); selectOption (idy); idy =opções [idy]; atraso (100); if (_WorkMode! =2) displayFrequency (lLastFreq); SweepReset (); pausa; caso 1:lFreq =atol (Freq); drawSymbol (9); drawSymbol (1); displaySweepIcons (); selectIcon (0, BRANCO); idy =0; displayFrequency (_Sweep (idy)); atraso (100); SweepReset (); modo =OPTSWEEP; pausa; caso 2:// ** sweepStatus:STILL 0 (nunca iniciado), 1 BREAK, 2 PAUSE ** if (sweepStatus ==STILL || sweepStatus ==PAUSE) {drawSymbol (3); // desenha o ícone de pausa selectIcon (2, WHITE); // selecione o ícone FrequencySweep (); // executa a varredura} else {// se pausado drawSymbol (4); // desenha o ícone de reprodução sweepStatus =PAUSE; } pausa; }} if (sweepStatus ==PAUSE) flashIcon (250); // pausa intermitente quebra de texto; // fim do modo SWEEP case OPÇÕES:// 3 if (encoderLongPush) reset (); // ------------------------------------------------ -------------------------------------------------- --------------------------------- // modo OPÇÕES:opção de seleção de rotação do codificador para alterar (modo de trabalho, tipo de onda, modo de acoplamento ) // ----------------------------------------------- -------------------------------------------------- ---------------------------------- if (encoderSpin) {if (encoderSpin ==CW &&idy <2) idy ++; if (encoderSpin ==CCW &&idy> 0) idy--; selectIcon (idy, BRANCO); } // ----------------------------------------------- -------------------------------------------------- ---------------------------------- // modo OPÇÕES:Codificador empurre o interruptor para o modo relativo // --- -------------------------------------------------- -------------------------------------------------- ---------------------------- if (encoderPush) {encoderPush =false; // selectIcon (idy, BLACK); selectOption (idy); ocultarCursor (0); idy =opções [idy]; } pausa; // modo final OPÇÕES case OPTMODE:// 4 // ------------------------------------- -------------------------------------------------- -------------------------------------------- // modo OPTMODE:Encoder ícones de modo de seleção de rotação (logarítmico, dígito único, varredura) // ------------------------------------- -------------------------------------------------- -------------------------------------------- if (encoderSpin) {if (encoderSpin ==CW &&idy <2) idy ++; if (encoderSpin ==CCW &&idy> 0) idy--; selectIcon (idy, BRANCO); } // ----------------------------------------------- -------------------------------------------------- ---------------------------------- // modo OPTMODE:Codificador push select workmode para definir (armazenado na opção [ 0]) // --------------------------------------------- -------------------------------------------------- ------------------------------------ if (encoderPush) {encoderPush =false; byte pMode =_WorkMode; switch (idy) {case 0:hideCursor (0); drawSymbol (0); lFreq =lLastFreq; displayFrequency (lFreq); _setWorkMode (LOGARITHMIC); pausa; caso 1:drawSymbol (0); selectDigit (0); lFreq =lLastFreq; displayFrequency (lFreq); _setWorkMode (SINGLEDIGIT); pausa; caso 2:lLastFreq =lFreq; displayFrequency (_SweepMin); // pronto para iniciar _setWorkMode (SWEEP); pausa; } mode =_WorkMode; if (pMode! =_WorkMode) saveConfig (); if (_CouplingMode ==OFF) resetCouplingMode (); idx =0; drawAllIcons (); } pausa; // modo final OPTMODE case OPTWAVE:// 5 // ------------------------------------- -------------------------------------------------- ------------------------- // modo OPTWAVE:A rotação do codificador move o cursor para a esquerda e para a direita para a seleção da onda (sqr, sin, tri) // - -------------------------------------------------- -------------------------------------------------- ----------- if (encoderSpin) {if (encoderSpin ==CW &&idy <2) idy ++; if (encoderSpin ==CCW &&idy> 0) idy--; selectIcon (idy, BRANCO); } // ----------------------------------------------- -------------------------------------------------- ------------------- // modo OPTWAVE:Encoder push define novo tipo de onda // ------------------ -------------------------------------------------- ------------------------------------------------ E se ( encoderPush) {encoderPush =false; if (_WaveType! =idy) {_setWaveType (idy); saveConfig (); } Frequência de atualização(); // atualiza o tipo de onda drawAllIcons (); idx =0; modo =_WorkMode; } pausa; // modo final OPTWAVE caso OPTCOUP:// 6 // ------------------------------------- -------------------------------------------------- ------------------------- // modo OPTCOUP:A rotação do codificador move o cursor para a esquerda e para a direita para a seleção do modo de acoplamento // ------- -------------------------------------------------- -------------------------------------------------- ----- if (encoderSpin) {if (encoderSpin ==CW &&idy <2) idy ++; if (encoderSpin ==CCW &&idy> 0) idy--; selectIcon (idy, BRANCO); } // ----------------------------------------------- -------------------------------------------------- ------------------- // modo OPTCOUP:Encoder push seleciona o modo de acoplamento atual // ------------------ -------------------------------------------------- ------------------------------------------------ E se ( encoderPush) {encoderPush =false; setCouplingMode (idy); drawAllIcons (); idx =0; modo =_WorkMode; } pausa; // modo final OPTCOUP caso OPTSWEEP:// 7 // ------------------------------------- -------------------------------------------------- ----------------------------- // modo OPTSWEEP:rotação do codificador seleciona valores de varredura para editar // ------- -------------------------------------------------- -------------------------------------------------- --------- if (encoderSpin) {if (encoderSpin ==CW &&idy <2) idy ++; // ponteiro de aumento no sentido horário if (encoderSpin ==CCW &&idy> 0) idy--; // ponteiro de diminuição no sentido anti-horário selectIcon (idy, WHITE); // selecione o primeiro ícone displayFrequency (_Sweep (idy)); // exibe o valor de varredura atual} if (encoderPush) {encoderPush =false; // ------------------------------------------------ -------------------------------------------------- ------------------ // modo OPTSWEEP:Encoder push confirma valores de varredura para editar // ------------------ -------------------------------------------------- ------------------------------------------------ drawSymbol ( 0); selectDigit (0); selectIcon (idy, BRANCO); idx =0; displayFrequency (_Sweep (idy)); modo =SWEEPEDIT; } pausa; // modo final OPTSWEEP case SWEEPEDIT:// 8 // ------------------------------------- -------------------------------------------------- ----------------------- // modo SWEEPEDIT:Codificador, rotação, selecione o dígito para alterar // -------------- -------------------------------------------------- ---------------------------------------------- if (encoderSpin) {if (encoderSpin ==CW &&idx  0) idx--; // ponteiro de diminuição no sentido anti-horário selectDigit (idx); } // ----------------------------------------------- -------------------------------------------------- ------------- // modo SWEEPEDIT:Encoder longpush sair da edição e retornar para SWEEP // --------------------- -------------------------------------------------- --------------------------------------- if (encoderLongPush ==LONGPUSH) {encoderPush =false; drawAllIcons (); displayFrequency (_SweepMin); ocultarCursor (idx); _setWorkMode (SWEEP); SweepReset (); modo =_WorkMode; atraso (250); } if (encoderPush) {encoderPush =false; // ------------------------------------------------ -------------------------------------------------- ----------- // modo SWEEPEDIT:Encoder push vai para o modo DIGITCHANGE // -------------------------- -------------------------------------------------- --------------------------------- hideCursor (idx); // flash cursor delay (250); // para selectDigit (idx); // confirmação visual drawSymbol (2); // desenhar ícone de curva mode =DIGITCHANGE; // alterar modo} break; // fim do modo SWEEPEDIT case DIGITCHANGE:// 9 // ------------------------------ -------------------------------------------------- ------------------------- // modo DIGITCHANGE:Saída longpush do codificador de DIGITCHANGE quando no modo VARREDURA // --------- -------------------------------------------------- ---------------------------------------------- if (encoderLongPush ==LONGPUSH &&_WorkMode ==SWEEP) {encoderPush =false; ocultarCursor (idx); drawSymbol (1); modo =OPTSWEEP; atraso (250); } // ----------------------------------------------- -------------------------------------------------- -------- // modo DIGITCHANGE:Valor do dígito de mudança de rotação do codificador (0 -> 9 -> 0 e assim por diante) // ------------------ -------------------------------------------------- ------------------------------------- if (encoderSpin) {// rotação do codificador if (encoderSpin ==CW) {// sentido horário Freq [idx] ++; if (Freq [idx]> '9') Freq [idx] ='0'; } else {// sentido anti-horário Freq [idx] -; if (Freq [idx] <'0') Freq [idx] ='9'; } updateDigit (idx, Freq [idx]); // atualizar dígito no display} // ----------------------------------------- -------------------------------------------------- -------------- // modo DIGITCHANGE:Encoder push retorna ao modo SINGLEDIGIT ou SWEEPEDIT // --------------------- -------------------------------------------------- ---------------------------------- if (encoderPush) {// sinalizador push do codificador definido por interrupção encoderPush =false; // redefine o sinalizador de evento hideCursor (idx); // flash cursor delay (250); // para selectDigit (idx); // confirmação visual drawSymbol (0); if (_WorkMode ==SWEEP) {long ltemp =_Sweep (idy); // salva o valor _setSweep (idy, atol (Freq)); // converter o novo valor da matriz para longo if (_SweepMax> 0 &&_SweepMax> _SweepMin &&_SweepStep>
 0) {// verificar a congruência do novo valor de varredura if (_Sweep (idy)! =ltemp) saveConfig (); // se o valor mudou, escreva um novo valor na EEPROM displayFrequency (_Sweep (idy)); modo =SWEEPEDIT; // mude o modo} else {_displayErrMsg; // exibe mensagem de erro armazenada em flash mem delay (1000); _setSweep (idy, ltemp); // restaura o valor salvo displayFrequency (_Sweep (idy)); // exibe novamente o valor drawSymbol (2); // ícone de volta do redesenho}} else {// se não estiver no modo de varredura if (_CouplingMode ==OFF) {// se o modo de acoplamento for OFF lLastFreq =atol (Freq); // salva a frequência atual resetCouplingMode (); // define o modo de acoplamento padrão} UpdateFrequency (); // envia frequência para o módulo DDS mode =SINGLEDIGIT; // mudar o modo}} break; // fim do modo DIGITCHANGE default:break; }} // ---------------------------------------------- -------------------------------------------------- ----------------------------------- // Evento do codificador push - Chamado por interrupção // ---- -------------------------------------------------- -------------------------------------------------- --------------------------- void encoderSwitch (void) {encoderPush =true;} // ---------- -------------------------------------------------- -------------------------------------------------- --------------------- // Funções utilitárias // ----------------------- -------------------------------------------------- -------------------------------------------------- -------- // Interface gráfica do Draw // ----------------------------------- -------------------------------------------------- --------------------------- void drawInterface () {display.clearDisplay (); display.display (); atraso (1000); display.drawRoundRect (0, 0, 128, 64, 3, BRANCO); // desenha o quadro externo display.fillRect (1, 1, 126, 14, WHITE); // desenha o quadro de legenda displayText (12, 4, strFromFlash (0), BLACK, WHITE, SMALL); // imprimir o título da legenda delay (1000); if (cTime ==1) {// apenas ligado ao displayText (XPOS - 6, YPOS + 10, strFromFlash (1), BRANCO, PRETO, GRANDE); // mostra o atraso da mensagem Welcom (1000); display.fillRect (2, 16, display.width () - 3, 35, PRETO); // limpar a mensagem de boas-vindas cTime =0; } display.display (); displayText (XPOS + 84, YPOS + 4, strFromFlash (2), BRANCO, PRETO, PEQUENO); // imprime "Hz" sprintf (Freq, "% 06li", lFreq); // coloque o valor de frequência na matriz de caracteres com o modelo "000000" para (int i =MAXDIGIT - 1; i> =0; i--) {display.drawChar (XPOS + 2 + i * DELTAX, YPOS, Freq [i] , BRANCO, PRETO, GRANDE); // Exibir com efeito de animação da direita para a esquerda display.display (); }} // fim de drawInterface () // ---------------------------------------- -------------------------------------------------- ---------------------- // Imprimir string em pos x, y com cores e tamanho especificados // ------------ -------------------------------------------------- -------------------------------------------------- void displayText (byte x, byte y, const char * str, byte foreColor, byte backColor, byte textSize) {display.setTextSize (textSize); // tamanho do texto:SMALL ou BIG global const display.setTextColor (foreColor, backColor); // colore a const global BRANCO ou PRETA da biblioteca display.setCursor (x, y); // define a posição do cursor display.print (str); // str é o ponteiro para a string de chars display.display (); // update display} // ------------------------------------------- -------------------------------------------------- ------------------- // Copia o elemento [i] do array string_table da memória flash para o buffer ram e retorna o ponteiro para o buffer // ---- -------------------------------------------------- -------------------------------------------------- -------- char * strFromFlash (byte i) {strcpy_P (buffer, (char *) pgm_read_word (&(string_table [i]))); return (char *) buffer;} // ---------------------------------------- -------------------------------------------------- ---------------------- // Desenhe ou limpe uma borda ao redor do ícone selecionado após limpar a borda do anterior // --------- -------------------------------------------------- -------------------------------------------------- --- void selectIcon (ícone de byte, cor de byte) {byte estático prevIcon; display.drawRect (XPOS - 10 + prevIcon * 32, YPOS + 19, 29, 20, PRETO); display.drawRect (XPOS - 10 + ícone * 32, YPOS + 19, 29, 20, cor); display.display (); prevIcon =icon;} // ------------------------------------------- -------------------------------------------------- ------------------- // Exibir todos os ícones do modo de trabalho // ----------------------- -------------------------------------------------- --------------------------------------- void displayWorkModeIcons (void) {byte const * bitmap [ 3] ={imgLog, imgDigit, imgSweep}; _clearIconsArea; para (byte i =0; i <=2; i ++) {display.drawBitmap (XPOS - 8 + i * 32, YPOS + 21, bitmap [i], 25, 16, BRANCO); } display.display ();} // ---------------------------------------- -------------------------------------------------- ---------------------- // Exibir todos os ícones de tipo de onda // -------------------- -------------------------------------------------- ------------------------------------------ void displayWaveTypeIcons (void) {byte const * bitmap [3] ={imgSqr, imgSin, imgTri}; _clearIconsArea; para (byte i =0; i <=2; i ++) {display.drawBitmap (XPOS - 8 + i * 32, YPOS + 21, bitmap [i], 25, 16, BRANCO); } display.display ();} // ---------------------------------------- -------------------------------------------------- ---------------------- // Exibir todos os ícones do modo de acoplamento // ------------------- -------------------------------------------------- ------------------------------------------- void displayCouplingModeIcons (void) {byte const * bitmap [3] ={imgCoAc, imgCoDc, imgCoOff}; _clearIconsArea; para (byte i =0; i <=2; i ++) {display.drawBitmap (XPOS - 8 + i * 32, YPOS + 21, bitmap [i], 25, 16, BRANCO); } display.display ();} // ---------------------------------------- -------------------------------------------------- ---------------------- // Exibir todos os ícones de varredura // -------------------- -------------------------------------------------- ------------------------------------------ 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();}//----------------------------------------------------------------------------------------------------------------// Draw all icons//----------------------------------------------------------------------------------------------------------------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); //ready to sweep 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); pausa; case 1:if (lLastFreq> 0) lFreq =lLastFreq; digitalWrite(PinCoupling, HIGH); _setCouplingMode(DC); pausa; case 2:lLastFreq =lFreq; lFreq =0; digitalWrite(PinCoupling, LOW); _setCouplingMode(OFF); pausa; } 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; pausa; case 1://waveType; displayWaveTypeIcons(); selectIcon(_WaveType, WHITE); mode =OPTWAVE; pausa; case 2://couplingMode; displayCouplingModeIcons(); selectIcon(_CouplingMode, WHITE); mode =OPTCOUP; pausa; }}//----------------------------------------------------------------------------------------------------------------// 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; return 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; return 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; pausa; } } 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; pausa; } } 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

Esquemas

Display type updated

Processo de manufatura

  1. Capturando as gotas de água com Arduino
  2. Arduino Spybot
  3. FlickMote
  4. TV B-Gone caseiro
  5. Relógio mestre
  6. Encontre-me
  7. Arduino Power
  8. Faça você mesmo skate de realidade virtual
  9. Como fazer a interface do Arduino Mega com o Módulo GPS NEO-6M
  10. Tech-TicTacToe