<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bruno Colombini on Medium]]></title>
        <description><![CDATA[Stories by Bruno Colombini on Medium]]></description>
        <link>https://medium.com/@brunocolombini?source=rss-c73dca217619------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o543cX6A549LpvdlDpFtLA.png</url>
            <title>Stories by Bruno Colombini on Medium</title>
            <link>https://medium.com/@brunocolombini?source=rss-c73dca217619------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:47:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brunocolombini/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to hacking your car with CAN-BUS + ATMega328p]]></title>
            <link>https://medium.com/@brunocolombini/how-to-hacking-your-car-with-can-bus-atmega328p-bf98901fe0fc?source=rss-c73dca217619------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf98901fe0fc</guid>
            <dc:creator><![CDATA[Bruno Colombini]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 15:46:00 GMT</pubDate>
            <atom:updated>2023-04-03T15:46:00.050Z</atom:updated>
            <content:encoded><![CDATA[<p>My incentive to start this challenge was lock and unlock the car door with ESP8266 + MCP2515 and AppleWatch, and I will follow with my saga for doing this.</p><p><em>In this article I will just teach how I add SnG on my car.</em></p><p>Well.</p><p><em>To remember this article is to medium maybe advanced users, </em><strong><em>I not will talk how can start programming, configure the environment and </em></strong><em>not teach how can you should use the </em><strong><em>soldering Iron.</em></strong></p><p><em>Do at yout responsability!</em></p><h3>My Setup:</h3><ul><li>Toyota Corolla Cross 2022 — Brazil (ACC under 23Mph or for real world 30Km/h is locked)</li><li>Comma 3</li></ul><h3>Pre requisistes:</h3><ul><li>Arduino (ATM328p) or NodeMCU V3 Esp8266</li><li>MCP2515 Module</li><li>Faith</li><li>Knowleads about programming with Arduino</li><li>Arduino environment configured</li><li><em>Protoboard (*Not necessary but is cool*)</em></li><li><em>Jumpers cable(*Not necessary but is cool*)</em></li></ul><p>Fill all pre requisites? Now we can start this nice adventure!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*nmMYDI-SpQq0ysJ6bH0SEA.png" /></figure><h3>Chapter 1:</h3><p>Verify the crystal frequency (oscillator) of MCP2515 module, this step is very important. I waste a lot of time to understand this, if I paid attention in this little detail my first attempt would have worked. Follow image with locate where you check this number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*C9Lb7lvZgs87izxqGozFxg.jpeg" /><figcaption>MCP2515 module, the red arrow show where you get the crystal frequency.</figcaption></figure><p>In my case I don’t saw that, and by default in MCP2515 library is 16MHZ and my component was 8MHZ.</p><h3>Chapter 2.1:</h3><p>Before start coding, we should mounting the scheme with Arduino + MCP2515 and find the wire for put can-filter module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*tFH8jynLfwMC93F-" /><figcaption>MCP2515 + Arduino Uno</figcaption></figure><p><strong>MCP2515 Module → Arduino (ATMega328p)</strong><br><strong>GND → GND<br>VCC → 5V<br>CS → D10<br>SI → D11<br>SO → D12<br>SCK → D13<br>INT → D2</strong></p><h3>Chapter 2.2</h3><p>On comma repository we can find the sceheme for some vehicles <a href="https://github.com/commaai/neo/blob/master/">https://github.com/commaai/neo/blob/master/</a>), in my case I use the toyota scheme, for obviously reasons. Ok, we can see on camera connector (1318774–1) the CAN2_H (PIN 5) e CAN2_L(PIN 11) , localizated? Ok put this wires on our MCP2515 module in your respective postions CAN2_H -&gt; H and CAN2_L -&gt; L (Check the imagine below) .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UWAmIapxf0k8CUnFCc6Q2Q.png" /><figcaption><a href="https://github.com/commaai/neo/blob/master/car_harness/Toyota_Harness.sch.pdf">https://github.com/commaai/neo/blob/master/car_harness/Toyota_Harness.sch.pdf</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*meD03Zb2f9OHkAuGrPTigQ.png" /></figure><p>Remeber the camera connector should connect on car camera to works!</p><h3>Chapter 3:</h3><p>In simple way we should install MCP2515 library (<a href="https://github.com/autowp/arduino-mcp2515">https://github.com/autowp/arduino-mcp2515</a>) and write the code on arduino IDE.</p><pre>#include &lt;mcp2515.h&gt;  <br><br>#define MCP_CS 10<br><br>MCP2515 mcp2515(MCP_CS);<br>struct can_frame canMsg;<br><br>void mcpSetup() {<br>  mcp2515.reset();<br>  mcp2515.setBitrate(CAN_500KBPS, MCP_8MHZ); //Here you will set <br>                                             //your module frequency<br>                                             //and CAN speed<br>  mcp2515.setNormalMode();<br>}<br><br>void injectSnG() {<br>  canMsg.can_id = 0x343;<br>  canMsg.can_dlc = 8;<br>  canMsg.data[0] = 0x00;<br>  canMsg.data[1] = 0x00;<br>  canMsg.data[2] = 0x40;<br>  canMsg.data[3] = 0x00;<br>  canMsg.data[4] = 0x00;<br>  canMsg.data[5] = 0x00;<br>  canMsg.data[6] = 0x00;<br>  canMsg.data[7] = 0x8e;<br>}<br><br>void setup() {<br>  mcpSetup();<br>  injectSnG();<br>  for(int i = 0 ; i &lt; 5000 ; i++){<br>    mcp2515.sendMessage(&amp;canMsg);<br>    delay(1);<br>  }<br>}<br><br>void loop() {<br>}</pre><p>Just this, well finish, your car now can have SnG!!! Congratsss??? No, we should jump the bootloader time (2s). In next chapter I will teach how to soluction this problem easly!</p><h3>Chapter 4:</h3><p>The focus of this article is not talk what is a bootloader or how arduino is work but if you wanna read more about follow the link (<a href="https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP">https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP</a>). Here i will put the youtube link with step by step to burn bootloader on your ATmega328p. This video will explain better than me how use another arduino to burn, but if you wanna you ISP device to do this its your choice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLO8nnQZCrMU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLO8nnQZCrMU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLO8nnQZCrMU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7869de2d1d50e619bafb8c07115e62e/href">https://medium.com/media/e7869de2d1d50e619bafb8c07115e62e/href</a></iframe><p>Thanks for your attention!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pR1HUo2jWWevKa44.png" /></figure><h3>Reference:</h3><ul><li><a href="https://medium.com/@tapecom/openpilot-stop-and-go-hack-for-thailand-toyota-corolla-cross-hybrid-premium-sefty-model-with-comma-b379a2a95bbc">https://medium.com/@tapecom/openpilot-stop-and-go-hack-for-thailand-toyota-corolla-cross-hybrid-premium-sefty-model-with-comma-b379a2a95bbc</a></li><li><a href="https://github.com/autowp/arduino-mcp2515">https://github.com/autowp/arduino-mcp2515</a></li><li><a href="https://github.com/commaai/neo/tree/master/car_harness">https://github.com/commaai/neo/tree/master/car_harness</a></li></ul><p>Thanks specials to <a href="https://medium.com/u/80537a6f8b33">Alexandre Nobuharu Sato</a> to found solution to <em>Stop and Go </em>and to <a href="https://medium.com/u/7e77baa257db">Rewat Sawingkoon</a> for doing<a href="https://medium.com/@tapecom/openpilot-stop-and-go-hack-for-thailand-toyota-corolla-cross-hybrid-premium-sefty-model-with-comma-b379a2a95bbc"> <em>article (Openpilot Stop and Go Hack for Thailand Toyota Corolla Cross Hybrid Premium Safety model with comma 2 device installed.)</em></a> with step by step to inject the Stop And Go.</p><h3>Reference:</h3><ul><li><a href="https://medium.com/@tapecom/openpilot-stop-and-go-hack-for-thailand-toyota-corolla-cross-hybrid-premium-sefty-model-with-comma-b379a2a95bbc">https://medium.com/@tapecom/openpilot-stop-and-go-hack-for-thailand-toyota-corolla-cross-hybrid-premium-sefty-model-with-comma-b379a2a95bbc</a></li><li><a href="https://github.com/autowp/arduino-mcp2515">https://github.com/autowp/arduino-mcp2515</a></li><li><a href="https://github.com/commaai/neo/tree/master/car_harness">https://github.com/commaai/neo/tree/master/car_harness</a></li><li>BOTAR VIDEO DO YOUTUBE</li></ul><p>Thanks specials to <a href="https://medium.com/u/80537a6f8b33">Alexandre Nobuharu Sato</a> to found solution to <em>Stop and Go </em>and to <a href="https://medium.com/u/7e77baa257db">Rewat Sawingkoon</a> for doing<a href="https://medium.com/@tapecom/openpilot-stop-and-go-hack-for-thailand-toyota-corolla-cross-hybrid-premium-sefty-model-with-comma-b379a2a95bbc"> <em>article (Openpilot Stop and Go Hack for Thailand Toyota Corolla Cross Hybrid Premium Safety model with comma 2 device installed.)</em></a> with step by step to inject the Stop And Go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf98901fe0fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Brincando com Flutter]]></title>
            <link>https://medium.com/@brunocolombini/brincando-com-flutter-72d930004e83?source=rss-c73dca217619------2</link>
            <guid isPermaLink="false">https://medium.com/p/72d930004e83</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Bruno Colombini]]></dc:creator>
            <pubDate>Sat, 31 Mar 2018 03:50:32 GMT</pubDate>
            <atom:updated>2018-03-31T03:50:32.030Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogNimrTnf_COR7ImVFr3-A.png" /></figure><p>Nesse artigo não estarei dando muitos detalhes técnicos sobre Flutter, e como ele funciona, talvez num futuro artigo estarei escrevendo sobre a comparação entre o Flutter, React-Native e Native.</p><h3>O Que é o Flutter?</h3><p>O Flutter é uma ferramenta, desenvolvida pela google, de desenvolvimento nativo para as 2 plataformas mais utilizadas hoje em dia, iOS e Android, é utilizado com a linguagem Dart, desenvolvida pela google também.</p><p>Numa breve comparação ao React-Native, a grande sacada do Flutter foi utilizar a linguagem Dart pois é compilada para varias plataformas gerando um arquivo binário que é executado nativamente, ele não precisa de uma bridge como o Javascript, com isso seu app acaba ficando mais otimizado.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*xjC_6oRd-2LM35z0Ff-bKg.png" /><figcaption>React-native (https://goo.gl/a8zN5u)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*T1Q3fA9uDUvot84Exf0WUg.png" /><figcaption>Flutter (https://goo.gl/QvJDkYcontent_copy)</figcaption></figure><p>Flutter trabalha com widgets, um dos widgets que será utilizado será o<em> </em><a href="https://docs.flutter.io/flutter/material/MaterialApp-class.html"><em>Widget MaterialApp</em></a>, geralmente é requerido para aplicações Material Design, e dentro dela se declara o nome da aplicação, o conteúdo do seu aplicativo, o tema , configuração de rota. Se desejar se aprofundar mais sobre o Widget MaterialApp você pode encontrar na própria documentação do Flutter.</p><h3>Tá e agora, vamos codar?</h3><p>Se é código que vocês querem, então código vocês terão!</p><p>Primeiro iremos instalar o Flutter, e depois faremos uma aplicação de 2 telas consumindo a<a href="https://coinmarketcap.com/api/"> <em>API da coinmarketcap</em></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*oZgQNYPV3Lf6F9iJPc64lg.jpeg" /></figure><p>Partindo da premissa que já estamos utilizando o Git e algum editor de texto ou ide instalada.<br>Recomendo utilizar <a href="https://code.visualstudio.com/download"><em>VSCod</em></a><em>e</em>, <a href="https://developer.android.com/studio/index.html"><em>Android Studio</em></a> ou <a href="https://www.jetbrains.com/idea/download/"><em>IntelliJ IDE</em></a> com o <a href="https://flutter.io/get-started/editor/#androidsstudio"><em>plugin Flutter instalado</em></a> em qualquer plataforma.</p><h3>Primeiros passos:</h3><p>Clone o repositório do Flutter, e defina o caminho do Flutter em sua variável PATH temporariamente.</p><pre>$ git clone -b beta https://github.com/flutter/flutter.git<br>$ export PATH=`pwd`/flutter/bin:$PATH</pre><p>Caso deseja tornar permanente em sua variável PATH basta adicionar em seu <em>.bash_profile, </em>que se encontra<em> </em>em seu diretório raiz <em>$HOME</em>.</p><pre>$ touch $HOME/.bash_profile #Caso não tenha o .bash_profile, o arquivo pode ter um nome diferente em sua maquina.<br>$ echo &quot;export PATH=$PWD/bin:$PATH\n&quot;$(cat $HOME/.bash_profile) &gt; $HOME/.bash_profile<br>$ source $HOME/.bash_profile # Atualiza sua variável PATH</pre><p>Agora estamos pronto para saber todas as pendências do Flutter, basta digitar o comando doctor do Flutter, que dirá quais requisitos estão pendentes e baixará o que falta.</p><pre>$ flutter doctor</pre><p>O resultado deve ser parecido com esse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*59osWZmVajYM0Nw9YVG3qw.png" /><figcaption>Resultado Flutter Doctor</figcaption></figure><h3>Criando seu primeiro projeto:</h3><p>Após termos configurado tudo vamos criar nosso primeiro projeto e rodar ele. Precisamos ter ao menos um device conectado ao micro para rodar o projeto, pode ser simulador iOS ou Android ou algum dispositivo conectado em sua usb. <br>Por experiência não use device apple pois precisará configurar o certificado e nesta etapa do projeto não será necessário, por sinal será bem chato configurar o certificado, então nesse momento opte pelos simuladores.</p><pre>$ flutter create [NOME_DO_PROJETO] #comando para criar o projeto<br>$ cd [NOME_DO_PROJETO] # entrando no diretório do projeto criado<br>$ flutter run #comando para rodar seu projeto criado</pre><p>Agora com o projeto rodando, a cada alteração que você fizer no código basta apertar o “r” em seu terminal para dar o hot reload sem zerar o estado da aplicação e o “R” para zera o estado da aplicação.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*S11ad4wibvu_YukBkV6WHQ.png" /></figure><h3>E ai, já estou bichão em Flutter, mas não “codei” uma linha!</h3><p>Jovem padawan, agora chegou seu momento de brilhar!</p><p>Dentro do projeto teremos um diretório chamado <em>lib</em>, e arvore de arquivos deve ser como a apresentada abaixo:</p><pre>...<br>├── lib<br>│   ├── components<br>│   |   └── list_view_coin_market.dart<br>│   └── view<br>|   |   ├── detail<br>|   |       └── detail_view.dart<br>|   |   └── list<br>|   |       └── custom_list_view.dart<br>|   └── main.dart<br>...</pre><h3><em>main.dart</em></h3><p><em>Linha 5</em> — Método obrigatório para execução do seu Flutter App.</p><p><em>Linha 10</em> — Estamos definindo o nome da classe e se essa classe será uma classe com mudança de estado ou não. <br><em>obs: O Flutter possui 3 tipos de classe Stateful, Statless e Inherited .</em></p><p><em>Linha 13 — </em>O widget Material App como explicado anteriormente é necessário para uma aplicação Material Design.</p><p><em>Linha 18 </em>— Definiremos qual será nosso layout da home:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a7c7f5a891aecdb0cdd2cadab8fe118/href">https://medium.com/media/4a7c7f5a891aecdb0cdd2cadab8fe118/href</a></iframe><h3>custom_list_view.dart</h3><p>Nessa classe iremos fazer a requisição com a API.</p><p><em>Linha 12</em>— Criação do método que irá fazer a requisição na API da coinmarket cap. O <em>async</em> quer dizer que esse método só ira retornar algo assim que todos os <em>await</em> tiverem terminados, lembra muito javascript o <em>async/await.</em></p><p>Linha 22 — É a sua estrutura de um app Material Design, nele definimos se nosso app tera toolbar, Drawer menu, background color e outras coisas mais.</p><p>Linha 23 — Widget AppBar é o widget que trata a Toolbar ou ActionBar.</p><p><em>Linha 26</em> — O <em>FutureBuilder </em>é um widget que trata tudo que for assíncrono e retorne um <em>AsyncSnapshot&lt;T&gt;.</em></p><p>Linha 28 — A propriedade <em>Builder</em> do widget <em>FutureBuilder, tem o context </em>da aplicação e o <em>snapshot</em>, o objeto que tem os dados da sua requisição e erros.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bde1c1d46d1dfcc5232e3f25f7312c7/href">https://medium.com/media/7bde1c1d46d1dfcc5232e3f25f7312c7/href</a></iframe><h3>list_view_coin_market.dart</h3><p>Componente responsável pela apresentação da listagem e a navegação entre telas.</p><p><em>Linha 7</em> — Constructor da classe.</p><p><em>Linha 12</em> — Quantidade de itens que terão sua lista, como a cada linha par será um <em>Divider</em> irei dobra o valor de elementos que eu possuo na minha lista.</p><p><em>Linha 13</em> — Builder que possui o contexto da aplicação e o index da <em>listview.</em></p><p>Linha 17 — <em>ListTile</em> é como um <em>Android.R.layout.simple_list_item_1</em>, possui title, subtitle e trailing.</p><p>Linha 18 — Ação de click na linha da lista.</p><p>Linha 19 — Objeto de navegação entre as telas.</p><p>inha 21 — O <em>CupertinoPageRoute</em> faz a animação da transação igual a do iOS. O Flutter também possui o <em>MaterialPageRoute</em> que faz igual ao Android</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/967d4202dbc93a4fd7407f2bc38a9284/href">https://medium.com/media/967d4202dbc93a4fd7407f2bc38a9284/href</a></iframe><h3>detail_view.dart</h3><p>Apresentação dos detalhes da moeda selecionada na lista.</p><p>Linha 59 — Widget <em>Column possui a </em>propriedade<em> children</em> para adicionar uma lista de Widget nela você ordena um elemento abaixo do outro.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/190f87c250558dc35aef7c6f8f57bb90/href">https://medium.com/media/190f87c250558dc35aef7c6f8f57bb90/href</a></iframe><p>Obrigado e até a próxima!</p><p>Link do projeto no Github:<br><a href="https://github.com/bcolombini/brincando_com_flutter">https://github.com/bcolombini/brincando_com_flutter</a></p><p>Quem sou:<br><a href="https://www.linkedin.com/in/brunocolombini">https://www.linkedin.com/in/brunocolombini</a></p><p>Referências:<br><a href="https://hackernoon.com/whats-revolutionary-about-flutter-946915b09514">https://hackernoon.com/whats-revolutionary-about-flutter-946915b09514</a><br><a href="https://flutter.io/">https://flutter.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72d930004e83" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>